antikit 1.12.3 → 1.12.5
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/package.json +1 -1
- package/src/commands/config.js +14 -9
- package/src/commands/local.js +1 -1
- package/src/commands/source.js +17 -9
package/package.json
CHANGED
package/src/commands/config.js
CHANGED
|
@@ -7,24 +7,29 @@ import {
|
|
|
7
7
|
loadConfig
|
|
8
8
|
} from '../utils/configManager.js';
|
|
9
9
|
|
|
10
|
+
import Table from 'cli-table3';
|
|
11
|
+
|
|
10
12
|
/**
|
|
11
13
|
* List all configurations
|
|
12
14
|
*/
|
|
13
15
|
export function listConfig() {
|
|
14
16
|
const config = loadConfig();
|
|
15
17
|
console.log(chalk.bold('\nCurrent Configuration:'));
|
|
16
|
-
console.log(chalk.dim('─'.repeat(40)));
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
19
|
+
const table = new Table({
|
|
20
|
+
head: [chalk.cyan('Setting'), chalk.cyan('Value')],
|
|
21
|
+
colWidths: [20, 60],
|
|
22
|
+
style: { head: [], border: [] }
|
|
23
|
+
});
|
|
23
24
|
|
|
24
|
-
|
|
25
|
+
const tokenDisplay = config.githubToken
|
|
26
|
+
? chalk.green('********' + config.githubToken.slice(-4))
|
|
27
|
+
: chalk.yellow('(not set)');
|
|
25
28
|
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
table.push(['GitHub Token', tokenDisplay]);
|
|
30
|
+
table.push(['Config File', getConfigPath()]);
|
|
31
|
+
|
|
32
|
+
console.log(table.toString());
|
|
28
33
|
console.log();
|
|
29
34
|
}
|
|
30
35
|
|
package/src/commands/local.js
CHANGED
|
@@ -23,7 +23,7 @@ export async function listLocalSkills() {
|
|
|
23
23
|
|
|
24
24
|
const table = new Table({
|
|
25
25
|
head: [chalk.cyan('Skill Name'), chalk.cyan('Version'), chalk.cyan('Description')],
|
|
26
|
-
colWidths: [
|
|
26
|
+
colWidths: [30, 15, Math.max(20, (process.stdout.columns || 80) - 55)],
|
|
27
27
|
wordWrap: true,
|
|
28
28
|
style: { head: [], border: [] }
|
|
29
29
|
});
|
package/src/commands/source.js
CHANGED
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
getConfigPath
|
|
8
8
|
} from '../utils/configManager.js';
|
|
9
9
|
|
|
10
|
+
import Table from 'cli-table3';
|
|
11
|
+
|
|
10
12
|
/**
|
|
11
13
|
* List all configured sources
|
|
12
14
|
*/
|
|
@@ -14,19 +16,25 @@ export function listSources() {
|
|
|
14
16
|
const sources = getSources();
|
|
15
17
|
|
|
16
18
|
console.log(chalk.bold('\nConfigured Sources:'));
|
|
17
|
-
|
|
19
|
+
|
|
20
|
+
const table = new Table({
|
|
21
|
+
head: [chalk.cyan('Name'), chalk.cyan('Repository'), chalk.cyan('Branch'), chalk.cyan('Path')],
|
|
22
|
+
colWidths: [20, 40, 15, 20],
|
|
23
|
+
style: { head: [], border: [] }
|
|
24
|
+
});
|
|
18
25
|
|
|
19
26
|
for (const source of sources) {
|
|
20
|
-
const defaultBadge = source.default ? chalk.green('
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
27
|
+
const defaultBadge = source.default ? chalk.green(' *') : '';
|
|
28
|
+
table.push([
|
|
29
|
+
chalk.bold(source.name) + defaultBadge,
|
|
30
|
+
`${source.owner}/${source.repo}`,
|
|
31
|
+
source.branch || 'main',
|
|
32
|
+
source.path || chalk.dim('(root)')
|
|
33
|
+
]);
|
|
25
34
|
}
|
|
26
35
|
|
|
27
|
-
console.log();
|
|
28
|
-
console.log(chalk.dim(
|
|
29
|
-
console.log();
|
|
36
|
+
console.log(table.toString());
|
|
37
|
+
console.log(chalk.dim(`\nConfig file: ${getConfigPath()}\n`));
|
|
30
38
|
}
|
|
31
39
|
|
|
32
40
|
/**
|