initx 0.0.30 → 0.0.31
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/README.md +1 -0
- package/dist/cli.mjs +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ Use [initx-plugin-starter](https://github.com/initx-collective/initx-plugin-star
|
|
|
19
19
|
- [cac](https://github.com/cacjs/cac)
|
|
20
20
|
- [ora](https://github.com/sindresorhus/ora)
|
|
21
21
|
- [defu](https://github.com/unjs/defu)
|
|
22
|
+
- [pathe](https://github.com/unjs/pathe)
|
|
22
23
|
- [tinyexec](https://github.com/tinylibs/tinyexec)
|
|
23
24
|
- [importx](https://github.com/antfu-collective/importx)
|
|
24
25
|
- [inquirer](https://github.com/SBoudrias/Inquirer.js)
|
package/dist/cli.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"node:process";import{loadPlugins as g,matchPlugins as h}from"@initx-plugin/core";import{log as e,loadingFunction as m,inquirer as u}from"@initx-plugin/utils";import d from"cac";const f={version:"0.0.
|
|
1
|
+
import t from"node:process";import{loadPlugins as g,matchPlugins as h}from"@initx-plugin/core";import{log as e,loadingFunction as m,inquirer as u}from"@initx-plugin/utils";import d from"cac";const f={version:"0.0.31"},l=d("initx");l.help().command("<something>","see https://github.com/initx-collective/initx").usage("").option("-v, --version","Display version number");const{args:x,options:o}=l.parse();(o.h||o.help)&&t.exit(0),(o.v||o.version)&&(console.log(f.version),t.exit(0));const[a,...v]=x;(!a||typeof a!="string")&&(e.error("Please enter something"),t.exit(0)),async function(){const s=await m("Loading plugins",g);s.length===0&&(e.error("No plugin installed"),t.exit(0));const c={key:a,cliOptions:o,optionsList:Object.keys(o).filter(i=>o[i]===!0).map(i=>`--${i}`)},n=await h(s,c,...v);if(n.length===0&&(e.warn("No handler found"),t.exit(0)),n.length===1){const[{handler:i}]=n;await i(),t.exit(0)}const r=await u.select("Which handler do you want to run?",n.map(({description:i,packageInfo:p})=>`[${p.name.replace(/^@?initx-plugin[-/]/,"")}] ${i}`));(!n[r]||typeof n[r].handler!="function")&&(e.error("Handler not found"),t.exit(0)),await n[r].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.31",
|
|
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/core": "0.0.
|
|
28
|
-
"@initx-plugin/utils": "0.0.
|
|
27
|
+
"@initx-plugin/core": "0.0.31",
|
|
28
|
+
"@initx-plugin/utils": "0.0.31"
|
|
29
29
|
},
|
|
30
30
|
"scripts": {
|
|
31
31
|
"stub": "unbuild --stub",
|