@lntvow/dev 4.4.12 → 4.4.13

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.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- "use strict";var D=Object.create;var f=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var F=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of R(e))!Y.call(t,i)&&i!==n&&f(t,i,{get:()=>e[i],enumerable:!(s=z(e,i))||s.enumerable});return t};var r=(t,e,n)=>(n=t!=null?D(U(t)):{},F(e||!t||!t.__esModule?f(n,"default",{value:t,enumerable:!0}):n,t));var I=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,d=I();var b=require("child_process"),a=require("fs"),j=require("path"),m=require("commander"),o=r(require("picocolors"),1),u=r(require("dayjs"),1),k=r(require("dayjs/plugin/timezone.js"),1),_=r(require("simple-git"),1);var v="@lntvow/dev",h="4.4.12";var l=r(require("fs"),1),p=r(require("path"),1),w=require("url"),g=r(require("picocolors"),1),M=(0,w.fileURLToPath)(d),T=p.default.dirname(M);function S(t,e){l.default.existsSync(e)||l.default.mkdirSync(e),l.default.readdirSync(t,{withFileTypes:!0}).forEach(s=>{let i=p.default.resolve(t,s.name),c=p.default.resolve(e,s.name);if(s.isDirectory())S(i,c);else{if(l.default.existsSync(c))return;l.default.copyFileSync(i,c)}})}function x(){console.log(g.default.blue("Start copying template files")),S(p.default.resolve(T,"./configs"),process.cwd()),console.log(g.default.green("Template files copied successfully"))}u.default.extend(k.default);console.log(o.default.blue(`Cwd is ${process.cwd()}`));m.program.name(v).version(h,"-v, --version","output the version number");m.program.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(t=>{console.log(o.default.green("Init project by @lntvow/dev"));let{temp:e,git:n,scripts:s}=t;if(e&&x(),n){console.log(o.default.blue("Start init simple-git-hooks"));let i=(0,b.execSync)("npx simple-git-hooks");console.log(i.toString())}if(s){console.log(o.default.blue("Start init scripts"));try{let i=(0,j.resolve)(process.cwd(),"package.json"),c=JSON.parse((0,a.readFileSync)(i,"utf-8"));c={...c,scripts:{postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc",...c.scripts}},(0,a.writeFileSync)(i,JSON.stringify(c,null,2)),console.log(o.default.green("Scripts added successfully"))}catch{console.log(o.default.yellow("No package.json file found ignoring scripts"))}}console.log(o.default.yellow(`
2
+ "use strict";var D=Object.create;var f=Object.defineProperty;var z=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var U=Object.getPrototypeOf,Y=Object.prototype.hasOwnProperty;var F=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of R(e))!Y.call(t,i)&&i!==n&&f(t,i,{get:()=>e[i],enumerable:!(s=z(e,i))||s.enumerable});return t};var r=(t,e,n)=>(n=t!=null?D(U(t)):{},F(e||!t||!t.__esModule?f(n,"default",{value:t,enumerable:!0}):n,t));var I=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href,d=I();var j=require("child_process"),a=require("fs"),b=require("path"),m=require("commander"),o=r(require("picocolors"),1),u=r(require("dayjs"),1),k=r(require("dayjs/plugin/timezone.js"),1),_=r(require("simple-git"),1);var v="@lntvow/dev",h="4.4.13";var l=r(require("fs"),1),p=r(require("path"),1),w=require("url"),g=r(require("picocolors"),1),M=(0,w.fileURLToPath)(d),T=p.default.dirname(M);function S(t,e){l.default.existsSync(e)||l.default.mkdirSync(e),l.default.readdirSync(t,{withFileTypes:!0}).forEach(s=>{let i=p.default.resolve(t,s.name),c=p.default.resolve(e,s.name);if(s.isDirectory())S(i,c);else{if(l.default.existsSync(c))return;l.default.copyFileSync(i,c)}})}function x(){console.log(g.default.blue("Start copying template files")),S(p.default.resolve(T,"./configs"),process.cwd()),console.log(g.default.green("Template files copied successfully"))}u.default.extend(k.default);console.log(o.default.blue(`Cwd is ${process.cwd()}`));m.program.name(v).version(h,"-v, --version","output the version number");m.program.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(t=>{console.log(o.default.green("Init project by @lntvow/dev"));let{temp:e,git:n,scripts:s}=t;if(e&&x(),n){console.log(o.default.blue("Start init simple-git-hooks"));let i=(0,j.execSync)("npx simple-git-hooks");console.log(i.toString())}if(s){console.log(o.default.blue("Start init scripts"));try{let i=(0,b.resolve)(process.cwd(),"package.json"),c=JSON.parse((0,a.readFileSync)(i,"utf-8"));c={...c,scripts:{postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc",...c.scripts}},(0,a.writeFileSync)(i,JSON.stringify(c,null,2)),console.log(o.default.green("Scripts added successfully"))}catch{console.log(o.default.yellow("No package.json file found ignoring scripts"))}}console.log(o.default.yellow(`
3
3
  You may need to re-execute the "pnpm install" command`))});m.program.command("release").description("git release").action(async()=>{console.log(o.default.green("Release project...")),await C()});m.program.parse();async function C(){let t=(0,_.default)(),e=(0,u.default)().format("YYYYMMDD");await t.cwd(process.cwd()),await t.pull(),await t.add("."),await t.commit(e,"--no-verify"),await t.push("origin"),console.log(o.default.green(`Changes committed with message: ${e}`))}
package/dist/cli.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import{execSync as x}from"child_process";import{readFileSync as S,writeFileSync as b}from"fs";import{resolve as j}from"path";import{program as r}from"commander";import i from"picocolors";import y from"dayjs";import k from"dayjs/plugin/timezone.js";import D from"simple-git";var a="@lntvow/dev",g="4.4.12";import c from"fs";import l from"path";import{fileURLToPath as v}from"url";import d from"picocolors";var h=v(import.meta.url),w=l.dirname(h);function u(t,o){c.existsSync(o)||c.mkdirSync(o),c.readdirSync(t,{withFileTypes:!0}).forEach(s=>{let n=l.resolve(t,s.name),e=l.resolve(o,s.name);if(s.isDirectory())u(n,e);else{if(c.existsSync(e))return;c.copyFileSync(n,e)}})}function f(){console.log(d.blue("Start copying template files")),u(l.resolve(w,"./configs"),process.cwd()),console.log(d.green("Template files copied successfully"))}y.extend(k);console.log(i.blue(`Cwd is ${process.cwd()}`));r.name(a).version(g,"-v, --version","output the version number");r.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(t=>{console.log(i.green("Init project by @lntvow/dev"));let{temp:o,git:p,scripts:s}=t;if(o&&f(),p){console.log(i.blue("Start init simple-git-hooks"));let n=x("npx simple-git-hooks");console.log(n.toString())}if(s){console.log(i.blue("Start init scripts"));try{let n=j(process.cwd(),"package.json"),e=JSON.parse(S(n,"utf-8"));e={...e,scripts:{postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc",...e.scripts}},b(n,JSON.stringify(e,null,2)),console.log(i.green("Scripts added successfully"))}catch{console.log(i.yellow("No package.json file found ignoring scripts"))}}console.log(i.yellow(`
2
+ import{execSync as x}from"child_process";import{readFileSync as S,writeFileSync as j}from"fs";import{resolve as b}from"path";import{program as r}from"commander";import i from"picocolors";import y from"dayjs";import k from"dayjs/plugin/timezone.js";import D from"simple-git";var a="@lntvow/dev",d="4.4.13";import c from"fs";import l from"path";import{fileURLToPath as v}from"url";import g from"picocolors";var h=v(import.meta.url),w=l.dirname(h);function u(t,o){c.existsSync(o)||c.mkdirSync(o),c.readdirSync(t,{withFileTypes:!0}).forEach(s=>{let n=l.resolve(t,s.name),e=l.resolve(o,s.name);if(s.isDirectory())u(n,e);else{if(c.existsSync(e))return;c.copyFileSync(n,e)}})}function f(){console.log(g.blue("Start copying template files")),u(l.resolve(w,"./configs"),process.cwd()),console.log(g.green("Template files copied successfully"))}y.extend(k);console.log(i.blue(`Cwd is ${process.cwd()}`));r.name(a).version(d,"-v, --version","output the version number");r.command("init").option("-t, --temp","copy template files",!0).option("--no-temp","not copy template files").option("-g, --git","init simple-git-hooks",!0).option("--no-git","not init simple-git-hooks").option("-s, --scripts","init scripts",!0).option("--no-scripts","not init scripts").description("init project").action(t=>{console.log(i.green("Init project by @lntvow/dev"));let{temp:o,git:p,scripts:s}=t;if(o&&f(),p){console.log(i.blue("Start init simple-git-hooks"));let n=x("npx simple-git-hooks");console.log(n.toString())}if(s){console.log(i.blue("Start init scripts"));try{let n=b(process.cwd(),"package.json"),e=JSON.parse(S(n,"utf-8"));e={...e,scripts:{postinstall:"simple-git-hooks",rimraf:"rimraf ./node_modules/",ncu:"ncu -u && pnpm install",commit:"git add . && git-cz && git push",release:"git add . && bumpp package.json --all --no-tag --no-print-commits","lint:eslint":'eslint "src/**/*.{js,jsx,ts,tsx,vue}" --fix',"lint:tsc":"tsc --noEmit",lint:"run-p lint:eslint lint:tsc",...e.scripts}},j(n,JSON.stringify(e,null,2)),console.log(i.green("Scripts added successfully"))}catch{console.log(i.yellow("No package.json file found ignoring scripts"))}}console.log(i.yellow(`
3
3
  You may need to re-execute the "pnpm install" command`))});r.command("release").description("git release").action(async()=>{console.log(i.green("Release project...")),await _()});r.parse();async function _(){let t=D(),o=y().format("YYYYMMDD");await t.cwd(process.cwd()),await t.pull(),await t.add("."),await t.commit(o,"--no-verify"),await t.push("origin"),console.log(i.green(`Changes committed with message: ${o}`))}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lntvow/dev",
3
- "version": "4.4.12",
3
+ "version": "4.4.13",
4
4
  "type": "module",
5
5
  "description": "Development environment dependencies package",
6
6
  "keywords": [
@@ -16,6 +16,7 @@
16
16
  "dist/configs/*"
17
17
  ],
18
18
  "bin": {
19
+ "dev": "./dist/cli.mjs",
19
20
  "lntvow": "./dist/cli.mjs"
20
21
  },
21
22
  "dependencies": {