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 +0 -0
- package/README.md +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
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"),
|
|
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
|
|
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.
|
|
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.
|
|
52
|
+
"simon-js-tool": "^4.1.13",
|
|
53
53
|
"vue": "^3.2.36"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|