initx 0.0.12 → 0.0.14

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.
Files changed (3) hide show
  1. package/README.md +13 -2
  2. package/dist/cli.mjs +9 -15
  3. package/package.json +7 -8
package/README.md CHANGED
@@ -1,9 +1,11 @@
1
- <h1 align="center">init 🛠</h1>
1
+ <h1 align="center">initx ⚙️</h1>
2
2
 
3
- <p align="center"><code>initx</code> More convenient initialization engine</p>
3
+ <p align="center"><code>initx</code> A more convenient scripting engine</p>
4
4
 
5
5
  <pre align="center">npx <b>initx &lt;something&gt;</b></pre>
6
6
 
7
+ # Plugins
8
+
7
9
  ## Git
8
10
 
9
11
  ```bash
@@ -92,3 +94,12 @@ Copy some text to clipboard
92
94
  ```bash
93
95
  npx initx cp ssh
94
96
  ```
97
+
98
+ # Acknowledgement
99
+
100
+ - [cac](https://github.com/cacjs/cac)
101
+ - [execa](https://github.com/sindresorhus/execa)
102
+ - [importx](https://github.com/antfu-collective/importx)
103
+ - [inquirer](https://github.com/SBoudrias/Inquirer.js)
104
+ - [picocolors](https://github.com/alexeyraspopov/picocolors)
105
+ - [which](https://github.com/npm/node-which)
package/dist/cli.mjs CHANGED
@@ -1,12 +1,11 @@
1
1
  import cac from 'cac';
2
- import inquirer from 'inquirer';
3
- import { log } from '@initx-plugin/utils';
2
+ import { log, inquirer } from '@initx-plugin/utils';
4
3
  import { loadPlugins } from '@initx-plugin/core';
5
4
 
6
- const pkgJson = {name:"initx",type:"module",version:"0.0.12",packageManager:"pnpm@9.12.2",description:"More convenient initialization engine",author:"imba97",license:"MIT",homepage:"https://github.com/imba97/initx#readme",repository:{type:"git",url:"git+ssh://git@github.com/imba97/initx"},bugs:{url:"https://github.com/imba97/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",inquirer:"^12.0.0"}};
5
+ const pkgJson = {name:"initx",type:"module",version:"0.0.14",packageManager:"pnpm@9.12.3",description:"A more convenient scripting engine",author:"imba97",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"}};
7
6
 
8
7
  const cli = cac("initx");
9
- cli.help().command("<something>", "see https://github.com/imba97/initx").usage("").option("-v, --version", "Display version number");
8
+ cli.help().command("<something>", "see https://github.com/initx-collective/initx").usage("").option("-v, --version", "Display version number");
10
9
  const { args, options: cliOptions } = cli.parse();
11
10
  if (cliOptions.h || cliOptions.help) {
12
11
  process.exit(0);
@@ -48,17 +47,12 @@ if (!key || typeof key !== "string") {
48
47
  await handler();
49
48
  return;
50
49
  }
51
- const { index } = await inquirer.prompt([
52
- {
53
- type: "list",
54
- name: "index",
55
- message: "Which handler do you want to run?",
56
- choices: matchedHandlers.map(({ description, packageInfo }, index2) => ({
57
- name: `[${packageInfo.name.replace(/^@?initx-plugin[-/]/, "")}] ${description}`,
58
- value: index2
59
- }))
60
- }
61
- ]);
50
+ const { index } = await inquirer.select(
51
+ "Which handler do you want to run?",
52
+ matchedHandlers.map(
53
+ ({ description, packageInfo }) => `[${packageInfo.name.replace(/^@?initx-plugin[-/]/, "")}] ${description}`
54
+ )
55
+ );
62
56
  if (!matchedHandlers[index] || typeof matchedHandlers[index].handler !== "function") {
63
57
  log.error("Handler not found");
64
58
  process.exit(0);
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "initx",
3
3
  "type": "module",
4
- "version": "0.0.12",
5
- "description": "More convenient initialization engine",
4
+ "version": "0.0.14",
5
+ "description": "A more convenient scripting engine",
6
6
  "author": "imba97",
7
7
  "license": "MIT",
8
- "homepage": "https://github.com/imba97/initx#readme",
8
+ "homepage": "https://github.com/initx-collective/initx#readme",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+ssh://git@github.com/imba97/initx"
11
+ "url": "git@github.com:initx-collective/initx.git"
12
12
  },
13
13
  "bugs": {
14
- "url": "https://github.com/imba97/initx/issues"
14
+ "url": "https://github.com/initx-collective/initx/issues"
15
15
  },
16
16
  "keywords": [
17
17
  "initx"
@@ -25,9 +25,8 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "cac": "^6.7.14",
28
- "inquirer": "^12.0.0",
29
- "@initx-plugin/core": "0.0.12",
30
- "@initx-plugin/utils": "0.0.12"
28
+ "@initx-plugin/core": "0.0.14",
29
+ "@initx-plugin/utils": "0.0.14"
31
30
  },
32
31
  "scripts": {
33
32
  "stub": "unbuild --stub",