initx 0.0.23 → 0.0.25

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
@@ -6,98 +6,18 @@
6
6
 
7
7
  # Plugins
8
8
 
9
- ## Git
9
+ - [@initx-plugin/git](https://github.com/initx-collective/initx-plugin-git)
10
+ - [@initx-plugin/gpg](https://github.com/initx-collective/initx-plugin-gpg)
11
+ - [@initx-plugin/cp](https://github.com/initx-collective/initx-plugin-cp)
10
12
 
11
- ```bash
12
- npm install @initx-plugin/git -g
13
- ```
13
+ You can use [@initx-plugin/manager](https://github.com/initx-collective/initx-plugin-manager) to manage plugins
14
14
 
15
- ### Git Repository
16
-
17
- Create a new repository or modify the remote repository address in the current directory
18
-
19
- ```bash
20
- npx initx git@github.com:user/repository.git
21
- ```
22
-
23
- ### Git Branch
24
-
25
- Specify a branch name
26
-
27
- ```bash
28
- npx initx git@github.com:user/repository.git main
29
- ```
30
-
31
- ### Git User
32
-
33
- Set git username and email
34
-
35
- ```bash
36
- npx initx user mail@example.com your_name
37
- ```
38
-
39
- ### Git GPG
40
-
41
- Select `Enable or disable GPG signing for git commits`, Set git commit signature
42
-
43
- ```bash
44
- # npx initx gpg [true|false]
45
- npx initx gpg true
46
- ```
47
-
48
- ## GPG
49
-
50
- ```bash
51
- npm install @initx-plugin/gpg -g
52
- ```
53
-
54
- Select `GPG key management`
55
-
56
- ### GPG import
57
-
58
- Automatically read files ending with `publich.key` and `private.key` in the current directory
59
-
60
- ```bash
61
- npx initx gpg import
62
- ```
63
-
64
- ### GPG export
65
-
66
- Export the public key and private key to the current directory
67
-
68
- ```bash
69
- # npx initx gpg export [filename]?
70
- npx initx gpg export home
71
- ```
72
-
73
- `home_public.key` and `home_private.key` will be created in the current directory
74
-
75
- ### GPG delete
76
-
77
- Delete the public key and private key
78
-
79
- ```bash
80
- # npx initx gpg delete [public|private]?
81
- npx initx gpg delete
82
- ```
83
-
84
- ## Clipboard
85
-
86
- ```bash
87
- npm install @initx-plugin/cp -g
88
- ```
89
-
90
- Copy some text to clipboard
91
-
92
- ### SSH Public Key
93
-
94
- ```bash
95
- npx initx cp ssh
96
- ```
15
+ Use [initx-plugin-starter](https://github.com/initx-collective/initx-plugin-starter) to get started
97
16
 
98
17
  # Acknowledgement
99
18
 
100
19
  - [cac](https://github.com/cacjs/cac)
20
+ - [defu](https://github.com/unjs/defu)
101
21
  - [execa](https://github.com/sindresorhus/execa)
102
22
  - [importx](https://github.com/antfu-collective/importx)
103
23
  - [inquirer](https://github.com/SBoudrias/Inquirer.js)
package/dist/cli.mjs CHANGED
@@ -1,8 +1,9 @@
1
- import cac from 'cac';
2
- import { log, inquirer } from '@initx-plugin/utils';
1
+ import process from 'node:process';
3
2
  import { loadPlugins, matchPlugins } from '@initx-plugin/core';
3
+ import { log, loadingFunction, inquirer } from '@initx-plugin/utils';
4
+ import cac from 'cac';
4
5
 
5
- const pkgJson = {name:"initx",type:"module",version:"0.0.23",packageManager:"pnpm@9.12.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"}};
6
+ const pkgJson = {name:"initx",type:"module",version:"0.0.25",packageManager:"pnpm@9.14.2",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"}};
6
7
 
7
8
  const cli = cac("initx");
8
9
  cli.help().command("<something>", "see https://github.com/initx-collective/initx").usage("").option("-v, --version", "Display version number");
@@ -20,7 +21,7 @@ if (!key || typeof key !== "string") {
20
21
  process.exit(0);
21
22
  }
22
23
  (async function() {
23
- const plugins = await loadPlugins();
24
+ const plugins = await loadingFunction("Loading plugins", loadPlugins);
24
25
  if (plugins.length === 0) {
25
26
  log.error("No plugin installed");
26
27
  process.exit(0);
@@ -37,7 +38,7 @@ if (!key || typeof key !== "string") {
37
38
  if (matchedHandlers.length === 1) {
38
39
  const [{ handler }] = matchedHandlers;
39
40
  await handler();
40
- return;
41
+ process.exit(0);
41
42
  }
42
43
  const index = await inquirer.select(
43
44
  "Which handler do you want to run?",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "initx",
3
3
  "type": "module",
4
- "version": "0.0.23",
4
+ "version": "0.0.25",
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.23",
28
- "@initx-plugin/utils": "0.0.23"
27
+ "@initx-plugin/core": "0.0.25",
28
+ "@initx-plugin/utils": "0.0.25"
29
29
  },
30
30
  "scripts": {
31
31
  "stub": "unbuild --stub",