ccommand 1.0.5 → 1.0.6

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/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var m=require("child_process"),l=require("simon-js-tool");function h(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var f=h(m);async function p(){const t=process.argv.slice(2),[e,s]=v(t),i=l.getPkgTool(),{scripts:c}=await l.getPkg(`${e||"."}/package.json`),u=[],d=Object.keys(c).reduce((r,n)=>{const o=c[n];return u.push(n),r+=`"${n}: ${o}",`,r},""),a=f.default.spawnSync(`echo ${d} | sed "s/,/\\n/g" | gum filter | cut -d' ' -f1`,{shell:!0,stdio:["inherit","pipe","inherit"],encoding:"utf8"}).output[1];if(!a)return console.log("\u5DF2\u53D6\u6D88"),process.exit();f.default.spawnSync(g(),{shell:!0,stdio:"inherit"});function $(r){return u.find(n=>r.startsWith(n))}function g(){let r="",n="";const o=i!=="yarn";return i==="npm"?(n=s?` -- ${s}`:"",r=e?` --prefix ${e} `:" "):i==="pnpm"?(n=s?` ${s}`:"",r=e?` --filter ${e} `:" "):i==="yarn"?(n=s?` ${s}`:"",r=e?` workspace ${e} `:" "):i==="bun"&&(n=s?` ${s}`:"",r=""),`${i}${o?" run":" "}${r}${$(a)}${n}`}}function v(t){const e=t[0];return e?e.startsWith("--")?[".",t.join(" ")]:[e,t.slice(1).join(" ")]:["",""]}p(),exports.ccommand=p;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var m=require("child_process"),c=require("simon-js-tool");function h(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var f=h(m);async function d(){const t=process.argv.slice(2);if(t[0]==="-v"){const{version:e}=await c.getPkg();console.log(`ccommand Version: ${e}`);return}const[n,s]=v(t),o=c.getPkgTool(),{scripts:u}=await c.getPkg(`${n||"."}/package.json`),a=[],p=Object.keys(u).reduce((e,r)=>{const i=u[r];return a.push(r),e+=`"${r}: ${i}",`,e},""),l=f.default.spawnSync(`echo ${p} | sed "s/,/\\n/g" | gum filter | cut -d' ' -f1`,{shell:!0,stdio:["inherit","pipe","inherit"],encoding:"utf8"}).output[1];if(!l)return console.log("\u5DF2\u53D6\u6D88"),process.exit();f.default.spawnSync($(),{shell:!0,stdio:"inherit"});function g(e){return a.find(r=>e.startsWith(r))}function $(){let e="",r="";const i=o!=="yarn";return o==="npm"?(r=s?` -- ${s}`:"",e=n?` --prefix ${n} `:" "):o==="pnpm"?(r=s?` ${s}`:"",e=n?` --filter ${n} `:" "):o==="yarn"?(r=s?` ${s}`:"",e=n?` workspace ${n} `:" "):o==="bun"&&(r=s?` ${s}`:"",e=""),`${o}${i?" run":" "}${e}${g(l)}${r}`}}function v(t){const n=t[0];return n?n.startsWith("--")?[".",t.join(" ")]:[n,t.slice(1).join(" ")]:["",""]}d(),exports.ccommand=d;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import a from"child_process";import{getPkgTool as g,getPkg as d}from"simon-js-tool";async function p(){const i=process.argv.slice(2),[t,r]=h(i),s=g(),{scripts:c}=await d(`${t||"."}/package.json`),u=[],l=Object.keys(c).reduce((e,n)=>{const o=c[n];return u.push(n),e+=`"${n}: ${o}",`,e},""),f=a.spawnSync(`echo ${l} | sed "s/,/\\n/g" | gum filter | cut -d' ' -f1`,{shell:!0,stdio:["inherit","pipe","inherit"],encoding:"utf8"}).output[1];if(!f)return console.log("\u5DF2\u53D6\u6D88"),process.exit();a.spawnSync(m(),{shell:!0,stdio:"inherit"});function $(e){return u.find(n=>e.startsWith(n))}function m(){let e="",n="";const o=s!=="yarn";return s==="npm"?(n=r?` -- ${r}`:"",e=t?` --prefix ${t} `:" "):s==="pnpm"?(n=r?` ${r}`:"",e=t?` --filter ${t} `:" "):s==="yarn"?(n=r?` ${r}`:"",e=t?` workspace ${t} `:" "):s==="bun"&&(n=r?` ${r}`:"",e=""),`${s}${o?" run":" "}${e}${$(f)}${n}`}}function h(i){const t=i[0];return t?t.startsWith("--")?[".",i.join(" ")]:[t,i.slice(1).join(" ")]:["",""]}p();export{p as ccommand};
2
+ import f from"child_process";import{getPkg as p,getPkgTool as d}from"simon-js-tool";async function l(){const s=process.argv.slice(2);if(s[0]==="-v"){const{version:t}=await p();console.log(`ccommand Version: ${t}`);return}const[n,r]=h(s),i=d(),{scripts:c}=await p(`${n||"."}/package.json`),u=[],$=Object.keys(c).reduce((t,e)=>{const o=c[e];return u.push(e),t+=`"${e}: ${o}",`,t},""),a=f.spawnSync(`echo ${$} | sed "s/,/\\n/g" | gum filter | cut -d' ' -f1`,{shell:!0,stdio:["inherit","pipe","inherit"],encoding:"utf8"}).output[1];if(!a)return console.log("\u5DF2\u53D6\u6D88"),process.exit();f.spawnSync(g(),{shell:!0,stdio:"inherit"});function m(t){return u.find(e=>t.startsWith(e))}function g(){let t="",e="";const o=i!=="yarn";return i==="npm"?(e=r?` -- ${r}`:"",t=n?` --prefix ${n} `:" "):i==="pnpm"?(e=r?` ${r}`:"",t=n?` --filter ${n} `:" "):i==="yarn"?(e=r?` ${r}`:"",t=n?` workspace ${n} `:" "):i==="bun"&&(e=r?` ${r}`:"",t=""),`${i}${o?" run":" "}${t}${m(a)}${e}`}}function h(s){const n=s[0];return n?n.startsWith("--")?[".",s.join(" ")]:[n,s.slice(1).join(" ")]:["",""]}l();export{l as ccommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccommand",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "packageManager": "pnpm@6.32.3",
5
5
  "description": "ccommand",
6
6
  "author": "Simon He",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@vueuse/core": "^8.1.1",
52
- "simon-js-tool": "^4.1.12",
52
+ "simon-js-tool": "^4.1.13",
53
53
  "vue": "^3.2.36"
54
54
  },
55
55
  "devDependencies": {