initx 0.0.28 → 0.0.29
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.mjs +1 -1
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"node:process";import{loadPlugins as u,matchPlugins as g}from"@initx-plugin/core";import{log as s,loadingFunction as d,inquirer as m}from"@initx-plugin/utils";import x from"cac";const h={name:"initx",type:"module",version:"0.0.
|
|
1
|
+
import e from"node:process";import{loadPlugins as u,matchPlugins as g}from"@initx-plugin/core";import{log as s,loadingFunction as d,inquirer as m}from"@initx-plugin/utils";import x from"cac";const h={name:"initx",type:"module",version:"0.0.29",packageManager:"pnpm@9.15.3",description:"A more convenient scripting engine",license:"MIT",homepage:"https://github.com/initx-collective/initx#readme",repository:{type:"git",url:"git@github.com:initx-collective/initx.git"},bugs:{url:"https://github.com/initx-collective/initx/issues"},keywords:["initx"],main:"dist/index.mjs",module:"dist/index.mjs",types:"dist/index.d.ts",bin:"bin/initx.mjs",files:["dist"],scripts:{stub:"unbuild --stub",build:"unbuild"},dependencies:{"@initx-plugin/core":"workspace:*","@initx-plugin/utils":"workspace:*",cac:"^6.7.14"}},c=x("initx");c.help().command("<something>","see https://github.com/initx-collective/initx").usage("").option("-v, --version","Display version number");const{args:b,options:n}=c.parse();(n.h||n.help)&&e.exit(0),(n.v||n.version)&&(console.log(h.version),e.exit(0));const[r,...f]=b;(!r||typeof r!="string")&&(s.error("Please enter something"),e.exit(0)),async function(){const l=await d("Loading plugins",u);l.length===0&&(s.error("No plugin installed"),e.exit(0));const a={key:r,cliOptions:n,optionsList:Object.keys(n).filter(t=>n[t]===!0).map(t=>`--${t}`)},i=g(l,a,...f);if(i.length===0&&e.exit(0),i.length===1){const[{handler:t}]=i;await t(),e.exit(0)}const o=await m.select("Which handler do you want to run?",i.map(({description:t,packageInfo:p})=>`[${p.name.replace(/^@?initx-plugin[-/]/,"")}] ${t}`));(!i[o]||typeof i[o].handler!="function")&&(s.error("Handler not found"),e.exit(0)),await i[o].handler()}();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "initx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.29",
|
|
5
5
|
"description": "A more convenient scripting engine",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/initx-collective/initx#readme",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"cac": "^6.7.14",
|
|
27
|
-
"@initx-plugin/
|
|
28
|
-
"@initx-plugin/
|
|
27
|
+
"@initx-plugin/core": "0.0.29",
|
|
28
|
+
"@initx-plugin/utils": "0.0.29"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"stub": "unbuild --stub",
|