@vef-framework/dev 2.0.9 → 2.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @vef-framework/dev v2.0.8 made by Venus | 2025-11-26T08:33:42.923Z */
1
+ /*! @vef-framework/dev v2.0.11 made by Venus | 2025-12-06T14:20:40.247Z */
2
2
  import{resolve as t}from"node:path";import g from"node:process";import o from"chalk";import{program as p}from"commander";import n from"consola";import{execa as m}from"execa";import j from"fs-extra";import x from"ora";import E from"prompts";const{exists:d,readJsonSync:S,writeFile:u,readJson:y,writeJson:w,copy:F,readFile:P,move:f}=j,s=g.cwd();function V(){const a=t(import.meta.dirname,"../../package.json");return S(a,{encoding:"utf-8"}).version}const k=V();function h(a,e){n.error(`Error during ${a}:`,e),g.exit(1)}p.name("vef").description(o.magenta("VEF Framework CLI")).addHelpText("before",o.blue("VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus.")).addHelpText("before",o.bgGreenBright(`Version: ${k}`)).version(k).option("--mode <mode>","Specify running mode (will override default NODE_ENV)"),p.command("prepare").description("Sets up the project for development mode").action(async()=>{if(!await d(t(s,".husky"))){const{default:l}=await import("husky");l(),n.success("Successfully set up husky")}await d(t(s,".husky/pre-commit"))||(await u(t(s,".husky/pre-commit"),"pnpm dlx lint-staged"),n.success("Successfully set up pre-commit hook")),await d(t(s,".husky/commit-msg"))||(await u(t(s,".husky/commit-msg"),"pnpm dlx commitlint --edit $1"),n.success("Successfully set up commit-msg hook"));const a=await y(t(s,"package.json"),{encoding:"utf-8"}),{scripts:e}=a;let r=!1;e.prepare||(e.prepare="vef prepare",r=!0),a["lint-staged"]||(a["lint-staged"]={"*.{js,ts,tsx,json,jsonc,md,mdx,html}":"eslint --fix","*.{css,scss}":"stylelint --fix"},r=!0),r&&(await w(t(s,"package.json"),a,{encoding:"utf-8",spaces:2}),n.success("Successfully set up prepare script and lint-staged"))}),p.command("update").description("Update the dependencies of the vef framework to latest version").action(async()=>{await m({cwd:s,stdio:"inherit"})("pnpm",["update","@vef-framework/*"])}),p.command("init").description("Initialize an empty VEF project").action(async()=>{console.log(o.blue(`Welcome to use the cli tool of VEF Framework
3
3
  `));const a=await E([{type:"text",name:"appName",message:"What is the name of your app?",validate:i=>typeof i=="string"&&i.trim().length>0?!0:"App name is required"},{type:"text",name:"appTitle",message:"What is the title of your app?",validate:i=>typeof i=="string"&&i.trim().length>0?!0:"App title is required"}]),{appName:e,appTitle:r}=a;await F(t(import.meta.dirname,"../template"),t(s,e)),n.success("Successfully copied template files"),await f(t(s,e,"_gitignore"),t(s,e,".gitignore")),await f(t(s,e,"_tsconfig.json"),t(s,e,"tsconfig.json")),await f(t(s,e,"_package.json"),t(s,e,"package.json"));const l=await y(t(s,e,"package.json"),{encoding:"utf-8"});l.name=e,await w(t(s,e,"package.json"),l,{encoding:"utf-8",spaces:2}),n.success("Successfully replaced name and title in package.json");const v=(await P(t(s,e,"env/.env"),{encoding:"utf-8"})).replace(/APP_NAME=.*$/m,`APP_NAME=${e}`).replace(/APP_TITLE=.*$/m,`APP_TITLE=${r}`);await u(t(s,e,"env/.env"),v),n.success("Successfully replaced name and title in .env file");const c=x("Initializing git repository...").start();try{await m`git --version`,await m({cwd:t(s,e)})`git init`,c.succeed("Successfully initialized git repository")}catch(i){c.fail("Failed to initialize git repository"),h("init",i)}c.start("Installing dependencies...");try{await m({cwd:t(s,e)})("pnpm",["install"]),c.succeed("Successfully installed dependencies")}catch(i){c.fail("Failed to install dependencies"),h("init",i)}n.success(o.green(`
4
4
  \u{1F389}\u{1F389}\u{1F389} VEF project created successfully !`)),console.log(o.blue(`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/dev",
3
3
  "type": "module",
4
- "version": "2.0.9",
4
+ "version": "2.0.11",
5
5
  "private": false,
6
6
  "description": "Dev tools for VEF framework",
7
7
  "author": {
@@ -73,13 +73,13 @@
73
73
  "@commitlint/config-conventional": "^20.0.0",
74
74
  "@emotion/babel-plugin": "^11.13.5",
75
75
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
76
- "@eslint-react/eslint-plugin": "^2.3.7",
76
+ "@eslint-react/eslint-plugin": "^2.3.12",
77
77
  "@eslint/js": "^9.39.1",
78
78
  "@stylistic/eslint-plugin": "^5.6.1",
79
79
  "@svgr/plugin-svgo": "^8.1.0",
80
80
  "@tanstack/eslint-plugin-query": "^5.91.2",
81
81
  "@tanstack/eslint-plugin-router": "^1.139.0",
82
- "@tanstack/router-plugin": "^1.139.6",
82
+ "@tanstack/router-plugin": "^1.139.14",
83
83
  "@vitejs/plugin-react": "^5.1.1",
84
84
  "babel-plugin-react-compiler": "1.0.0",
85
85
  "chalk": "^5.6.2",
@@ -88,7 +88,7 @@
88
88
  "dotenv": "^17.2.3",
89
89
  "eslint-config-flat-gitignore": "^2.1.0",
90
90
  "eslint-plugin-antfu": "^3.1.1",
91
- "eslint-plugin-format": "^1.0.2",
91
+ "eslint-plugin-format": "^1.1.0",
92
92
  "eslint-plugin-import-lite": "^0.3.0",
93
93
  "eslint-plugin-perfectionist": "^4.15.1",
94
94
  "eslint-plugin-react-hooks": "7.0.1",
@@ -96,7 +96,7 @@
96
96
  "eslint-plugin-regexp": "^2.10.0",
97
97
  "eslint-plugin-unicorn": "^62.0.0",
98
98
  "eslint-plugin-unused-imports": "^4.3.0",
99
- "execa": "^9.6.0",
99
+ "execa": "^9.6.1",
100
100
  "fs-extra": "^11.3.2",
101
101
  "html-minifier-terser": "^7.2.0",
102
102
  "ora": "^9.0.0",
@@ -104,7 +104,7 @@
104
104
  "radashi": "^12.7.1",
105
105
  "recast": "^0.23.11",
106
106
  "sass-embedded": "^1.93.3",
107
- "typescript-eslint": "^8.48.0",
107
+ "typescript-eslint": "^8.48.1",
108
108
  "unplugin-config": "^0.1.5",
109
109
  "unplugin-icons": "^22.5.0",
110
110
  "vite-plugin-eslint2": "^5.0.4",
@@ -122,14 +122,14 @@
122
122
  "eslint": "^9.39.1",
123
123
  "husky": "^9.1.7",
124
124
  "lint-staged": "^16.2.7",
125
- "stylelint": "^16.26.0",
125
+ "stylelint": "^16.26.1",
126
126
  "stylelint-config-recess-order": "^7.4.0",
127
127
  "stylelint-config-recommended": "^17.0.0",
128
128
  "stylelint-config-standard-scss": "^16.0.0",
129
129
  "stylelint-order": "^7.0.0",
130
130
  "tsup": "^8.5.1",
131
- "type-fest": "^5.2.0",
132
- "vite": "^7.2.4"
131
+ "type-fest": "^5.3.0",
132
+ "vite": "^7.2.6"
133
133
  },
134
134
  "scripts": {
135
135
  "clean": "rimraf dist",