diff --git a/bun.lockb b/bun.lockb index 454367e..b066ad4 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index a6d5cad..d810455 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "next-gdrive-index", - "version": "2.0.4", + "version": "2.4.2", "private": true, "scripts": { "dev": "next dev -p 3000", @@ -10,7 +10,8 @@ "lint": "next lint", "lint:fix": "next lint --fix", "format": "prettier --write \"**/*.{js,jsx,ts,tsx,json}\" --cache", - "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json}\" --cache" + "format:check": "prettier --check \"**/*.{js,jsx,ts,tsx,json}\" --cache", + "cli": "node ./scripts/cli.mjs" }, "dependencies": { "@hookform/resolvers": "^3.10.0", @@ -88,12 +89,16 @@ "@typescript-eslint/eslint-plugin": "^8.1.0", "@typescript-eslint/parser": "^8.1.0", "autoprefixer": "^10.4.19", + "chalk": "^5.4.1", + "commander": "^13.1.0", "encoding": "^0.1.13", "eslint": "^8.57.0", "eslint-config-next": "^15.0.1", + "ora": "^8.2.0", "postcss": "^8.4.38", "prettier": "3.0.0", "prettier-plugin-tailwindcss": "0.5.12", + "prompts": "^2.4.2", "tailwindcss": "^3.4.1", "typescript": "^5.5.3" } diff --git a/src/config/gIndex.config.ts b/src/config/gIndex.config.ts index d0a13ae..2a4f994 100644 --- a/src/config/gIndex.config.ts +++ b/src/config/gIndex.config.ts @@ -8,7 +8,7 @@ const config: z.input = { * If possible, please don't change this value * Even if you're creating a PR, just let me change it myself */ - version: "2.0.4", + version: "2.4.2", /** * Base path of the app, used for generating links * @@ -27,7 +27,7 @@ const config: z.input = { * * @default false */ - showGuideButton: true, + showGuideButton: false, /** * How long the cache will be stored in the browser diff --git a/src/lib/configurationHelper.ts b/src/lib/configurationHelper.ts index 42bac5a..5d5c0e8 100644 --- a/src/lib/configurationHelper.ts +++ b/src/lib/configurationHelper.ts @@ -13,7 +13,7 @@ import config from "~/config/gIndex.config"; export const versionExpectMap: Record<"v1" | "v2" | "latest", string[]> = { v1: ["1.0.0", "1.0.1", "1.0.2", "1.0.3"], v2: ["2.0.0", "2.0.1", "2.0.2", "2.0.3"], - latest: ["2.0.4"], + latest: ["2.0.4", "2.4.0", "2.4.1", "2.4.2"], }; export type PickFileResponse = | { @@ -166,7 +166,7 @@ export const initialConfiguration: z.input = { }; export const configurationTemplate = `import { type z } from "zod"; -import { BASE_URL } from "~/constant"; +import { BASE_URL, IS_DEV } from "~/constant"; import { type Schema_Config } from "~/types/schema"; @@ -184,7 +184,7 @@ const config: z.input = { * @default process.env.NEXT_PUBLIC_DOMAIN * @fallback process.env.NEXT_PUBLIC_VERCEL_URL */ - basePath: \`https://\${BASE_URL}\`, + basePath: IS_DEV ? "http://localhost:3000" : \`https://\${BASE_URL}\`, /** * Show deploy guide dropdown on navbar