@lytjs/cli 3.2.2 → 3.2.4

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/index.js CHANGED
@@ -75,7 +75,7 @@ body {
75
75
  font-size: 1.2rem;
76
76
  color: #666;
77
77
  }
78
- `}function ye(e){return JSON.stringify({name:e,version:"0.1.0",private:!0,type:"module",scripts:{dev:"lyt dev",build:"lyt build",preview:"lyt preview"},dependencies:{"@lytjs/lytjs":"latest"},devDependencies:{typescript:"^5.0.0"}},null,2)+`
78
+ `}function ye(e){return JSON.stringify({name:e,version:"0.1.0",private:!0,type:"module",scripts:{dev:"lyt dev",build:"lyt build",preview:"lyt preview"},dependencies:{"@lytjs/lytjs":"latest"},devDependencies:{"@lytjs/cli":"latest",typescript:"^5.0.0"}},null,2)+`
79
79
  `}function be(){return JSON.stringify({compilerOptions:{target:"ES2020",module:"ESNext",moduleResolution:"bundler",strict:!0,jsx:"preserve",resolveJsonModule:!0,isolatedModules:!0,esModuleInterop:!0,lib:["ES2020","DOM","DOM.Iterable"],skipLibCheck:!0,noEmit:!0,paths:{"@/*":["./src/*"]}},include:["src/**/*.ts","src/**/*.tsx"],exclude:["node_modules","dist"]},null,2)+`
80
80
  `}function xe(){return`# \u4F9D\u8D56
81
81
  node_modules/
@@ -100,7 +100,7 @@ Thumbs.db
100
100
  # \u65E5\u5FD7
101
101
  *.log
102
102
  npm-debug.log*
103
- `}async function _(e,o={}){let n=o.template||"spa",r=T.resolve(process.cwd(),e);i.info(`\u6B63\u5728\u521B\u5EFA Lyt \u9879\u76EE: ${t(e,"brightCyan")}`),i.info(`\u4F7F\u7528\u6A21\u677F: ${t(n,"brightCyan")}`),F(r)&&(i.error(`\u76EE\u5F55 "${e}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u540D\u79F0\u6216\u5220\u9664\u5DF2\u6709\u76EE\u5F55`),process.exit(1)),$(r);let s=[{filePath:"index.html",content:fe()},{filePath:"src/main.ts",content:ge()},{filePath:"src/App.ts",content:me()},{filePath:"src/style.css",content:he()},{filePath:"package.json",content:ye(e)},{filePath:"tsconfig.json",content:be()},{filePath:".gitignore",content:xe()}];for(let a of s){let u=T.join(r,a.filePath);S(u,a.content),i.success(` \u521B\u5EFA ${a.filePath}`)}console.log(""),i.success(`\u9879\u76EE ${t(e,"brightCyan")} \u521B\u5EFA\u6210\u529F\uFF01`),console.log(""),console.log(" \u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u542F\u52A8\u9879\u76EE\uFF1A"),console.log(""),console.log(` ${t("cd","brightGreen")} ${e}`),console.log(` ${t("npm install","brightGreen")}`),console.log(` ${t("npm run dev","brightGreen")}`),console.log("")}var D=m(require("path"));function ve(e){let o={name:e.name,version:"0.1.0",private:!0,type:"module",scripts:{dev:"lytx dev",build:"lytx build",preview:"lytx preview"},dependencies:{"@lytjs/lytjs":"latest"}};return e.ts&&(o.devDependencies={typescript:"^5.0.0"}),e.eslint&&(o.devDependencies=o.devDependencies||{},o.devDependencies.eslint="^8.0.0",o.scripts=o.scripts||{},o.scripts.lint="eslint src --ext .ts,.js"),e.router&&(o.dependencies["@lytjs/router"]="latest"),e.store&&(o.dependencies["@lytjs/store"]="latest"),JSON.stringify(o,null,2)+`
103
+ `}async function _(e,o={}){let n=o.template||"spa",r=T.resolve(process.cwd(),e);i.info(`\u6B63\u5728\u521B\u5EFA Lyt \u9879\u76EE: ${t(e,"brightCyan")}`),i.info(`\u4F7F\u7528\u6A21\u677F: ${t(n,"brightCyan")}`),F(r)&&(i.error(`\u76EE\u5F55 "${e}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u540D\u79F0\u6216\u5220\u9664\u5DF2\u6709\u76EE\u5F55`),process.exit(1)),$(r);let s=[{filePath:"index.html",content:fe()},{filePath:"src/main.ts",content:ge()},{filePath:"src/App.ts",content:me()},{filePath:"src/style.css",content:he()},{filePath:"package.json",content:ye(e)},{filePath:"tsconfig.json",content:be()},{filePath:".gitignore",content:xe()}];for(let a of s){let u=T.join(r,a.filePath);S(u,a.content),i.success(` \u521B\u5EFA ${a.filePath}`)}console.log(""),i.success(`\u9879\u76EE ${t(e,"brightCyan")} \u521B\u5EFA\u6210\u529F\uFF01`),console.log(""),console.log(" \u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u542F\u52A8\u9879\u76EE\uFF1A"),console.log(""),console.log(` ${t("cd","brightGreen")} ${e}`),console.log(` ${t("npm install","brightGreen")}`),console.log(` ${t("npm run dev","brightGreen")}`),console.log("")}var D=m(require("path"));function ve(e){let o={name:e.name,version:"0.1.0",private:!0,type:"module",scripts:{dev:"lytx dev",build:"lytx build",preview:"lytx preview"},dependencies:{"@lytjs/lytjs":"latest"}};return e.ts&&(o.devDependencies={"@lytjs/cli":"latest",typescript:"^5.0.0"}),e.eslint&&(o.devDependencies=o.devDependencies||{},o.devDependencies.eslint="^8.0.0",o.scripts=o.scripts||{},o.scripts.lint="eslint src --ext .ts,.js"),e.router&&(o.dependencies["@lytjs/router"]="latest"),e.store&&(o.dependencies["@lytjs/store"]="latest"),JSON.stringify(o,null,2)+`
104
104
  `}function $e(e){let o={compilerOptions:{target:"ES2020",module:"ESNext",moduleResolution:"bundler",strict:!0,jsx:"preserve",resolveJsonModule:!0,isolatedModules:!0,esModuleInterop:!0,lib:["ES2020","DOM","DOM.Iterable"],skipLibCheck:!0,noEmit:!0,paths:{"@/*":["./src/*"]}},include:["src/**/*.ts","src/**/*.tsx"],exclude:["node_modules","dist"]};return e.template==="ssr"&&(o.compilerOptions.types=["node"]),JSON.stringify(o,null,2)+`
105
105
  `}function we(e){let o=e.ts?".ts":".js";return`<!DOCTYPE html>
106
106
  <html lang="zh-CN">
@@ -258,7 +258,7 @@ a:hover {
258
258
  <text x="16" y="22" text-anchor="middle" fill="white" font-size="18" font-weight="bold">L</text>
259
259
  </svg>
260
260
  `}function ke(){return JSON.stringify({root:!0,env:{browser:!0,es2021:!0,node:!0},extends:["eslint:recommended"],parserOptions:{ecmaVersion:"latest",sourceType:"module"},rules:{"no-unused-vars":"warn","no-console":"warn"}},null,2)+`
261
- `}async function L(e){let{name:o,template:n,ts:r,router:s,store:a,eslint:u}=e,l=D.resolve(process.cwd(),o);if(i.info(`\u6B63\u5728\u521B\u5EFA Lyt \u9879\u76EE: ${t(o,"brightCyan")}`),i.info(`\u4F7F\u7528\u6A21\u677F: ${t(n,"brightCyan")}`),F(l))throw i.error(`\u76EE\u5F55 "${o}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u540D\u79F0\u6216\u5220\u9664\u5DF2\u6709\u76EE\u5F55`),new Error(`Directory "${o}" already exists`);$(l);let c=[{filePath:"package.json",content:ve(e)},{filePath:"index.html",content:we(e)},{filePath:"lytx.config.ts",content:Se(e)},{filePath:"src/main.ts",content:Ce(e)},{filePath:"src/App.lyt",content:je()},{filePath:"src/pages/index.ts",content:Me()},{filePath:"src/pages/about.ts",content:Pe()},{filePath:"src/components/Header.ts",content:Re()},{filePath:"src/styles/main.css",content:Ee()},{filePath:"public/favicon.svg",content:Fe()}];r&&c.push({filePath:"tsconfig.json",content:$e(e)}),s&&c.push({filePath:"src/router/index.ts",content:He()}),a&&c.push({filePath:"src/store/index.ts",content:Ae()}),u&&c.push({filePath:".eslintrc.json",content:ke()});for(let p of c){let d=D.join(l,p.filePath);S(d,p.content),i.success(` \u521B\u5EFA ${p.filePath}`)}console.log(""),i.success(`\u9879\u76EE ${t(o,"brightCyan")} \u521B\u5EFA\u6210\u529F\uFF01`),console.log(""),console.log(" \u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u542F\u52A8\u9879\u76EE\uFF1A"),console.log(""),console.log(` ${t("cd","brightGreen")} ${o}`),console.log(` ${t("npm install","brightGreen")}`),console.log(` ${t("npm run dev","brightGreen")}`),console.log("")}var K=m(require("fs")),B=m(require("fs")),M=m(require("path"));var J=m(require("http")),j=m(require("fs")),b=m(require("path")),q=m(require("crypto")),O=class{constructor(){this.clients=[]}handleUpgrade(o,n,r){let s=o.headers["sec-websocket-key"];if(!s){n.destroy();return}let a=q.createHash("sha1").update(s+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11").digest("base64");n.write(`HTTP/1.1 101 Switching Protocols\r
261
+ `}async function L(e){let{name:o,template:n,ts:r,router:s,store:a,eslint:u}=e,l=D.resolve(process.cwd(),o);if(i.info(`\u6B63\u5728\u521B\u5EFA Lyt \u9879\u76EE: ${t(o,"brightCyan")}`),i.info(`\u4F7F\u7528\u6A21\u677F: ${t(n,"brightCyan")}`),F(l))throw i.error(`\u76EE\u5F55 "${o}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u540D\u79F0\u6216\u5220\u9664\u5DF2\u6709\u76EE\u5F55`),new Error(`Directory "${o}" already exists`);$(l);let c=[{filePath:"package.json",content:ve(e)},{filePath:"index.html",content:we(e)},{filePath:"lytx.config.ts",content:Se(e)},{filePath:"src/main.ts",content:Ce(e)},{filePath:"src/App.lyt",content:je()},{filePath:"src/pages/index.ts",content:Me()},{filePath:"src/pages/about.ts",content:Pe()},{filePath:"src/components/Header.ts",content:Re()},{filePath:"src/styles/main.css",content:Ee()},{filePath:"public/favicon.svg",content:Fe()}];r&&c.push({filePath:"tsconfig.json",content:$e(e)}),s&&c.push({filePath:"src/router/index.ts",content:He()}),a&&c.push({filePath:"src/store/index.ts",content:Ae()}),u&&c.push({filePath:".eslintrc.json",content:ke()});for(let p of c){let d=D.join(l,p.filePath);S(d,p.content),i.success(` \u521B\u5EFA ${p.filePath}`)}console.log(""),i.success(`\u9879\u76EE ${t(o,"brightCyan")} \u521B\u5EFA\u6210\u529F\uFF01`),console.log(""),console.log(" \u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u542F\u52A8\u9879\u76EE\uFF1A"),console.log(""),console.log(` ${t("cd","brightGreen")} ${o}`),console.log(` ${t("npm install","brightGreen")}`),console.log(` ${t("npm run dev","brightGreen")}`),console.log("")}var K=m(require("http")),B=m(require("fs")),M=m(require("path"));var J=m(require("http")),j=m(require("fs")),b=m(require("path")),q=m(require("crypto")),O=class{constructor(){this.clients=[]}handleUpgrade(o,n,r){let s=o.headers["sec-websocket-key"];if(!s){n.destroy();return}let a=q.createHash("sha1").update(s+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11").digest("base64");n.write(`HTTP/1.1 101 Switching Protocols\r
262
262
  Upgrade: websocket\r
263
263
  Connection: Upgrade\r
264
264
  Sec-WebSocket-Accept: ${a}\r
package/dist/index.mjs CHANGED
@@ -75,7 +75,7 @@ body {
75
75
  font-size: 1.2rem;
76
76
  color: #666;
77
77
  }
78
- `}function ae(e){return JSON.stringify({name:e,version:"0.1.0",private:!0,type:"module",scripts:{dev:"lyt dev",build:"lyt build",preview:"lyt preview"},dependencies:{"@lytjs/lytjs":"latest"},devDependencies:{typescript:"^5.0.0"}},null,2)+`
78
+ `}function ae(e){return JSON.stringify({name:e,version:"0.1.0",private:!0,type:"module",scripts:{dev:"lyt dev",build:"lyt build",preview:"lyt preview"},dependencies:{"@lytjs/lytjs":"latest"},devDependencies:{"@lytjs/cli":"latest",typescript:"^5.0.0"}},null,2)+`
79
79
  `}function le(){return JSON.stringify({compilerOptions:{target:"ES2020",module:"ESNext",moduleResolution:"bundler",strict:!0,jsx:"preserve",resolveJsonModule:!0,isolatedModules:!0,esModuleInterop:!0,lib:["ES2020","DOM","DOM.Iterable"],skipLibCheck:!0,noEmit:!0,paths:{"@/*":["./src/*"]}},include:["src/**/*.ts","src/**/*.tsx"],exclude:["node_modules","dist"]},null,2)+`
80
80
  `}function ce(){return`# \u4F9D\u8D56
81
81
  node_modules/
@@ -100,7 +100,7 @@ Thumbs.db
100
100
  # \u65E5\u5FD7
101
101
  *.log
102
102
  npm-debug.log*
103
- `}async function Y(e,o={}){let n=o.template||"spa",r=F.resolve(process.cwd(),e);s.info(`\u6B63\u5728\u521B\u5EFA Lyt \u9879\u76EE: ${t(e,"brightCyan")}`),s.info(`\u4F7F\u7528\u6A21\u677F: ${t(n,"brightCyan")}`),A(r)&&(s.error(`\u76EE\u5F55 "${e}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u540D\u79F0\u6216\u5220\u9664\u5DF2\u6709\u76EE\u5F55`),process.exit(1)),v(r);let i=[{filePath:"index.html",content:ne()},{filePath:"src/main.ts",content:re()},{filePath:"src/App.ts",content:se()},{filePath:"src/style.css",content:ie()},{filePath:"package.json",content:ae(e)},{filePath:"tsconfig.json",content:le()},{filePath:".gitignore",content:ce()}];for(let a of i){let u=F.join(r,a.filePath);w(u,a.content),s.success(` \u521B\u5EFA ${a.filePath}`)}console.log(""),s.success(`\u9879\u76EE ${t(e,"brightCyan")} \u521B\u5EFA\u6210\u529F\uFF01`),console.log(""),console.log(" \u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u542F\u52A8\u9879\u76EE\uFF1A"),console.log(""),console.log(` ${t("cd","brightGreen")} ${e}`),console.log(` ${t("npm install","brightGreen")}`),console.log(` ${t("npm run dev","brightGreen")}`),console.log("")}import*as k from"path";function pe(e){let o={name:e.name,version:"0.1.0",private:!0,type:"module",scripts:{dev:"lytx dev",build:"lytx build",preview:"lytx preview"},dependencies:{"@lytjs/lytjs":"latest"}};return e.ts&&(o.devDependencies={typescript:"^5.0.0"}),e.eslint&&(o.devDependencies=o.devDependencies||{},o.devDependencies.eslint="^8.0.0",o.scripts=o.scripts||{},o.scripts.lint="eslint src --ext .ts,.js"),e.router&&(o.dependencies["@lytjs/router"]="latest"),e.store&&(o.dependencies["@lytjs/store"]="latest"),JSON.stringify(o,null,2)+`
103
+ `}async function Y(e,o={}){let n=o.template||"spa",r=F.resolve(process.cwd(),e);s.info(`\u6B63\u5728\u521B\u5EFA Lyt \u9879\u76EE: ${t(e,"brightCyan")}`),s.info(`\u4F7F\u7528\u6A21\u677F: ${t(n,"brightCyan")}`),A(r)&&(s.error(`\u76EE\u5F55 "${e}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u540D\u79F0\u6216\u5220\u9664\u5DF2\u6709\u76EE\u5F55`),process.exit(1)),v(r);let i=[{filePath:"index.html",content:ne()},{filePath:"src/main.ts",content:re()},{filePath:"src/App.ts",content:se()},{filePath:"src/style.css",content:ie()},{filePath:"package.json",content:ae(e)},{filePath:"tsconfig.json",content:le()},{filePath:".gitignore",content:ce()}];for(let a of i){let u=F.join(r,a.filePath);w(u,a.content),s.success(` \u521B\u5EFA ${a.filePath}`)}console.log(""),s.success(`\u9879\u76EE ${t(e,"brightCyan")} \u521B\u5EFA\u6210\u529F\uFF01`),console.log(""),console.log(" \u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u542F\u52A8\u9879\u76EE\uFF1A"),console.log(""),console.log(` ${t("cd","brightGreen")} ${e}`),console.log(` ${t("npm install","brightGreen")}`),console.log(` ${t("npm run dev","brightGreen")}`),console.log("")}import*as k from"path";function pe(e){let o={name:e.name,version:"0.1.0",private:!0,type:"module",scripts:{dev:"lytx dev",build:"lytx build",preview:"lytx preview"},dependencies:{"@lytjs/lytjs":"latest"}};return e.ts&&(o.devDependencies={"@lytjs/cli":"latest",typescript:"^5.0.0"}),e.eslint&&(o.devDependencies=o.devDependencies||{},o.devDependencies.eslint="^8.0.0",o.scripts=o.scripts||{},o.scripts.lint="eslint src --ext .ts,.js"),e.router&&(o.dependencies["@lytjs/router"]="latest"),e.store&&(o.dependencies["@lytjs/store"]="latest"),JSON.stringify(o,null,2)+`
104
104
  `}function ue(e){let o={compilerOptions:{target:"ES2020",module:"ESNext",moduleResolution:"bundler",strict:!0,jsx:"preserve",resolveJsonModule:!0,isolatedModules:!0,esModuleInterop:!0,lib:["ES2020","DOM","DOM.Iterable"],skipLibCheck:!0,noEmit:!0,paths:{"@/*":["./src/*"]}},include:["src/**/*.ts","src/**/*.tsx"],exclude:["node_modules","dist"]};return e.template==="ssr"&&(o.compilerOptions.types=["node"]),JSON.stringify(o,null,2)+`
105
105
  `}function de(e){let o=e.ts?".ts":".js";return`<!DOCTYPE html>
106
106
  <html lang="zh-CN">
@@ -258,7 +258,7 @@ a:hover {
258
258
  <text x="16" y="22" text-anchor="middle" fill="white" font-size="18" font-weight="bold">L</text>
259
259
  </svg>
260
260
  `}function Se(){return JSON.stringify({root:!0,env:{browser:!0,es2021:!0,node:!0},extends:["eslint:recommended"],parserOptions:{ecmaVersion:"latest",sourceType:"module"},rules:{"no-unused-vars":"warn","no-console":"warn"}},null,2)+`
261
- `}async function O(e){let{name:o,template:n,ts:r,router:i,store:a,eslint:u}=e,l=k.resolve(process.cwd(),o);if(s.info(`\u6B63\u5728\u521B\u5EFA Lyt \u9879\u76EE: ${t(o,"brightCyan")}`),s.info(`\u4F7F\u7528\u6A21\u677F: ${t(n,"brightCyan")}`),A(l))throw s.error(`\u76EE\u5F55 "${o}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u540D\u79F0\u6216\u5220\u9664\u5DF2\u6709\u76EE\u5F55`),new Error(`Directory "${o}" already exists`);v(l);let c=[{filePath:"package.json",content:pe(e)},{filePath:"index.html",content:de(e)},{filePath:"lytx.config.ts",content:fe(e)},{filePath:"src/main.ts",content:ge(e)},{filePath:"src/App.lyt",content:me()},{filePath:"src/pages/index.ts",content:he()},{filePath:"src/pages/about.ts",content:ye()},{filePath:"src/components/Header.ts",content:be()},{filePath:"src/styles/main.css",content:$e()},{filePath:"public/favicon.svg",content:we()}];r&&c.push({filePath:"tsconfig.json",content:ue(e)}),i&&c.push({filePath:"src/router/index.ts",content:xe()}),a&&c.push({filePath:"src/store/index.ts",content:ve()}),u&&c.push({filePath:".eslintrc.json",content:Se()});for(let p of c){let d=k.join(l,p.filePath);w(d,p.content),s.success(` \u521B\u5EFA ${p.filePath}`)}console.log(""),s.success(`\u9879\u76EE ${t(o,"brightCyan")} \u521B\u5EFA\u6210\u529F\uFF01`),console.log(""),console.log(" \u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u542F\u52A8\u9879\u76EE\uFF1A"),console.log(""),console.log(` ${t("cd","brightGreen")} ${o}`),console.log(` ${t("npm install","brightGreen")}`),console.log(` ${t("npm run dev","brightGreen")}`),console.log("")}import*as J from"fs";import*as D from"fs";import*as j from"path";import*as z from"http";import*as C from"fs";import*as y from"path";import*as _ from"crypto";var T=class{constructor(){this.clients=[]}handleUpgrade(o,n,r){let i=o.headers["sec-websocket-key"];if(!i){n.destroy();return}let a=_.createHash("sha1").update(i+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11").digest("base64");n.write(`HTTP/1.1 101 Switching Protocols\r
261
+ `}async function O(e){let{name:o,template:n,ts:r,router:i,store:a,eslint:u}=e,l=k.resolve(process.cwd(),o);if(s.info(`\u6B63\u5728\u521B\u5EFA Lyt \u9879\u76EE: ${t(o,"brightCyan")}`),s.info(`\u4F7F\u7528\u6A21\u677F: ${t(n,"brightCyan")}`),A(l))throw s.error(`\u76EE\u5F55 "${o}" \u5DF2\u5B58\u5728\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u540D\u79F0\u6216\u5220\u9664\u5DF2\u6709\u76EE\u5F55`),new Error(`Directory "${o}" already exists`);v(l);let c=[{filePath:"package.json",content:pe(e)},{filePath:"index.html",content:de(e)},{filePath:"lytx.config.ts",content:fe(e)},{filePath:"src/main.ts",content:ge(e)},{filePath:"src/App.lyt",content:me()},{filePath:"src/pages/index.ts",content:he()},{filePath:"src/pages/about.ts",content:ye()},{filePath:"src/components/Header.ts",content:be()},{filePath:"src/styles/main.css",content:$e()},{filePath:"public/favicon.svg",content:we()}];r&&c.push({filePath:"tsconfig.json",content:ue(e)}),i&&c.push({filePath:"src/router/index.ts",content:xe()}),a&&c.push({filePath:"src/store/index.ts",content:ve()}),u&&c.push({filePath:".eslintrc.json",content:Se()});for(let p of c){let d=k.join(l,p.filePath);w(d,p.content),s.success(` \u521B\u5EFA ${p.filePath}`)}console.log(""),s.success(`\u9879\u76EE ${t(o,"brightCyan")} \u521B\u5EFA\u6210\u529F\uFF01`),console.log(""),console.log(" \u8BF7\u6267\u884C\u4EE5\u4E0B\u547D\u4EE4\u542F\u52A8\u9879\u76EE\uFF1A"),console.log(""),console.log(` ${t("cd","brightGreen")} ${o}`),console.log(` ${t("npm install","brightGreen")}`),console.log(` ${t("npm run dev","brightGreen")}`),console.log("")}import*as J from"http";import*as D from"fs";import*as j from"path";import*as z from"http";import*as C from"fs";import*as y from"path";import*as _ from"crypto";var T=class{constructor(){this.clients=[]}handleUpgrade(o,n,r){let i=o.headers["sec-websocket-key"];if(!i){n.destroy();return}let a=_.createHash("sha1").update(i+"258EAFA5-E914-47DA-95CA-C5AB0DC85B11").digest("base64");n.write(`HTTP/1.1 101 Switching Protocols\r
262
262
  Upgrade: websocket\r
263
263
  Connection: Upgrade\r
264
264
  Sec-WebSocket-Accept: ${a}\r
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lytjs/cli",
3
- "version": "3.2.2",
3
+ "version": "3.2.4",
4
4
  "description": "Lyt.js 命令行工具 - 提供项目创建、开发服务器和构建功能",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",