initx 0.1.0 → 0.1.2

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 CHANGED
@@ -62,7 +62,7 @@ initx cp ssh
62
62
  # after
63
63
  initx pm add ~/projects # add projects directory, only need to do it once
64
64
  initx create user/repo
65
- # or initx create user/repo project-name
65
+ # or initx pm create user/repo project-name
66
66
  ```
67
67
 
68
68
  </details>
package/dist/cli.d.mts CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- export { }
2
+ export { };
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- export { }
2
+ export { };
package/dist/cli.mjs CHANGED
@@ -1 +1 @@
1
- import i from"node:process";import{detectManager as m,installManager as h,loadPlugins as u,matchPlugins as d}from"@initx-plugin/core";import{log as o,loadingFunction as l,inquirer as f}from"@initx-plugin/utils";import x from"cac";const v={version:"0.1.0"},c=x("initx");c.help().command("<something>","see https://github.com/initx-collective/initx").usage("").option("-v, --version","Display version number");const{args:w,options:e}=c.parse();(e.h||e.help)&&i.exit(0),(e.v||e.version)&&(console.log(v.version),i.exit(0));const[r,...y]=w;(!r||typeof r!="string")&&(o.error("Please enter something"),i.exit(0)),async function(){m()||await l("Installing manager plugin",h);const s=await l("Loading plugins",u);s.length===0&&(o.error("No plugin installed"),i.exit(0));const p={key:r,cliOptions:e,optionsList:Object.keys(e).filter(t=>e[t]===!0).map(t=>`--${t}`)},n=await d(s,p,...y);if(n.length===0&&(o.warn("No handler found"),i.exit(0)),n.length===1){const[{handler:t}]=n;await t(),i.exit(0)}const a=await f.select("Which handler do you want to run?",n.map(({description:t,packageInfo:g})=>`[${g.name.replace(/^@?initx-plugin[-/]/,"")}] ${t}`));(!n[a]||typeof n[a].handler!="function")&&(o.error("Handler not found"),i.exit(0)),await n[a].handler()}();
1
+ import i from"node:process";import{detectManager as h,installManager as u,loadPlugins as d,matchPlugins as f}from"@initx-plugin/core";import{log as o,loadingFunction as r,inquirer as x}from"@initx-plugin/utils";import w from"cac";const v={version:"0.1.2"},g=w("initx");g.help().command("<something>","see https://github.com/initx-collective/initx").usage("").option("-v, --version","Display version number");const{args:y,options:e}=g.parse();(e.h||e.help)&&i.exit(0),(e.v||e.version)&&(console.log(v.version),i.exit(0));const[s,...b]=y;(!s||typeof s!="string")&&(o.error("Please enter something"),i.exit(0)),(async function(){let l;await r("initx",async()=>{l=await h()}),l||await r("Installing manager plugin",u);const c=await r("Loading plugins",d);c.length===0&&(o.error("No plugin installed"),i.exit(0));const p={key:s,cliOptions:e,optionsList:Object.keys(e).filter(t=>e[t]===!0).map(t=>`--${t}`)},n=await f(c,p,...b);if(n.length===0&&(o.warn("No handler found"),i.exit(0)),n.length===1){const[{handler:t}]=n;await t(),i.exit(0)}const a=await x.select("Which handler do you want to run?",n.map(({description:t,packageInfo:m})=>`[${m.name.replace(/^@?initx-plugin[-/]/,"")}] ${t}`));(!n[a]||typeof n[a].handler!="function")&&(o.error("Handler not found"),i.exit(0)),await n[a].handler()})();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "initx",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.1.2",
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.1.0",
28
- "@initx-plugin/utils": "0.1.0"
27
+ "@initx-plugin/core": "0.1.2",
28
+ "@initx-plugin/utils": "0.1.2"
29
29
  },
30
30
  "scripts": {
31
31
  "stub": "unbuild --stub",