ccjk 12.0.0 → 12.0.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/dist/chunks/agent-teams.mjs +17 -18
- package/dist/chunks/agent.mjs +105 -102
- package/dist/chunks/agents.mjs +87 -77
- package/dist/chunks/api-cli.mjs +41 -27
- package/dist/chunks/api-providers.mjs +2 -4
- package/dist/chunks/api.mjs +22 -11
- package/dist/chunks/auto-bootstrap.mjs +3 -5
- package/dist/chunks/auto-init.mjs +3 -4
- package/dist/chunks/auto-updater.mjs +103 -91
- package/dist/chunks/banner.mjs +41 -42
- package/dist/chunks/boost.mjs +30 -31
- package/dist/chunks/ccjk-agents.mjs +6 -9
- package/dist/chunks/ccjk-all.mjs +703 -85
- package/dist/chunks/ccjk-config.mjs +6 -6
- package/dist/chunks/ccjk-hooks.mjs +20 -9
- package/dist/chunks/ccjk-mcp.mjs +64 -52
- package/dist/chunks/ccjk-setup.mjs +35 -25
- package/dist/chunks/ccjk-skills.mjs +51 -41
- package/dist/chunks/ccr.mjs +42 -32
- package/dist/chunks/ccu.mjs +16 -12
- package/dist/chunks/check-updates.mjs +30 -19
- package/dist/chunks/claude-code-config-manager.mjs +25 -10
- package/dist/chunks/claude-code-incremental-manager.mjs +65 -51
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/claude-wrapper.mjs +9 -6
- package/dist/chunks/cleanup-migration.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +10 -3
- package/dist/chunks/cloud-sync.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +58 -45
- package/dist/chunks/codex-provider-manager.mjs +29 -16
- package/dist/chunks/codex-uninstaller.mjs +5 -6
- package/dist/chunks/codex.mjs +89 -89
- package/dist/chunks/commands.mjs +28 -29
- package/dist/chunks/commands2.mjs +4 -3
- package/dist/chunks/commit.mjs +42 -23
- package/dist/chunks/completion.mjs +46 -47
- package/dist/chunks/config-consolidator.mjs +12 -13
- package/dist/chunks/config-switch.mjs +66 -53
- package/dist/chunks/config.mjs +10 -10
- package/dist/chunks/config2.mjs +53 -42
- package/dist/chunks/config3.mjs +107 -93
- package/dist/chunks/constants.mjs +2 -4
- package/dist/chunks/context-loader.mjs +5 -4
- package/dist/chunks/context.mjs +77 -76
- package/dist/chunks/convoy-manager.mjs +4 -4
- package/dist/chunks/dashboard.mjs +28 -29
- package/dist/chunks/doctor.mjs +68 -54
- package/dist/chunks/evolution.mjs +37 -38
- package/dist/chunks/features.mjs +103 -92
- package/dist/chunks/fs-operations.mjs +1 -1
- package/dist/chunks/health-alerts.mjs +1 -1
- package/dist/chunks/health-check.mjs +1 -1
- package/dist/chunks/help.mjs +117 -116
- package/dist/chunks/hook-installer.mjs +3 -2
- package/dist/chunks/index.mjs +20 -6
- package/dist/chunks/index10.mjs +1171 -0
- package/dist/chunks/index11.mjs +1008 -0
- package/dist/chunks/index12.mjs +193 -0
- package/dist/chunks/index13.mjs +218 -0
- package/dist/chunks/index14.mjs +663 -0
- package/dist/chunks/index2.mjs +19 -10
- package/dist/chunks/index3.mjs +19079 -164
- package/dist/chunks/index4.mjs +8 -1171
- package/dist/chunks/index5.mjs +7479 -884
- package/dist/chunks/index6.mjs +160 -184
- package/dist/chunks/index7.mjs +3573 -653
- package/dist/chunks/index8.mjs +19 -0
- package/dist/chunks/index9.mjs +616 -0
- package/dist/chunks/init.mjs +173 -173
- package/dist/chunks/installer.mjs +92 -82
- package/dist/chunks/installer2.mjs +3 -2
- package/dist/chunks/interview.mjs +118 -107
- package/dist/chunks/json-config.mjs +3 -2
- package/dist/chunks/linux.mjs +3863 -0
- package/dist/chunks/macos.mjs +69 -0
- package/dist/chunks/main.mjs +635 -0
- package/dist/chunks/marketplace.mjs +69 -66
- package/dist/chunks/mcp-cli.mjs +61 -48
- package/dist/chunks/mcp.mjs +140 -127
- package/dist/chunks/menu.mjs +85 -85
- package/dist/chunks/metrics-display.mjs +41 -40
- package/dist/chunks/migrator.mjs +4 -5
- package/dist/chunks/monitor.mjs +95 -95
- package/dist/chunks/notification.mjs +151 -141
- package/dist/chunks/onboarding.mjs +26 -15
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/paradigm.mjs +24 -23
- package/dist/chunks/permission-manager.mjs +10 -11
- package/dist/chunks/permissions.mjs +72 -57
- package/dist/chunks/persistence-manager.mjs +97 -84
- package/dist/chunks/persistence.mjs +1 -1
- package/dist/chunks/platform.mjs +29 -29
- package/dist/chunks/plugin.mjs +104 -105
- package/dist/chunks/prompts.mjs +36 -25
- package/dist/chunks/providers.mjs +68 -69
- package/dist/chunks/quick-actions.mjs +71 -72
- package/dist/chunks/quick-provider.mjs +56 -40
- package/dist/chunks/quick-setup.mjs +71 -60
- package/dist/chunks/remote.mjs +21 -12
- package/dist/chunks/session.mjs +116 -103
- package/dist/chunks/sessions.mjs +29 -28
- package/dist/chunks/silent-updater.mjs +8 -10
- package/dist/chunks/simple-config.mjs +13 -10
- package/dist/chunks/skill.mjs +8560 -103
- package/dist/chunks/skills-sync.mjs +5212 -79
- package/dist/chunks/skills.mjs +105 -94
- package/dist/chunks/slash-commands.mjs +36 -37
- package/dist/chunks/smart-defaults.mjs +7 -3
- package/dist/chunks/smart-guide.mjs +1 -1
- package/dist/chunks/startup.mjs +2 -4
- package/dist/chunks/stats.mjs +41 -42
- package/dist/chunks/status.mjs +49 -50
- package/dist/chunks/team.mjs +24 -12
- package/dist/chunks/thinking.mjs +74 -63
- package/dist/chunks/trace.mjs +20 -19
- package/dist/chunks/uninstall.mjs +69 -56
- package/dist/chunks/update.mjs +39 -28
- package/dist/chunks/upgrade-manager.mjs +24 -18
- package/dist/chunks/version-checker.mjs +45 -41
- package/dist/chunks/vim.mjs +81 -69
- package/dist/chunks/windows.mjs +14 -0
- package/dist/chunks/workflows.mjs +15 -15
- package/dist/chunks/wsl.mjs +129 -0
- package/dist/chunks/zero-config.mjs +45 -34
- package/dist/cli.mjs +20 -20
- package/dist/index.mjs +41 -31
- package/dist/shared/ccjk.BAGoDD49.mjs +36 -0
- package/dist/shared/ccjk.BBtCGd_g.mjs +899 -0
- package/dist/shared/{ccjk.CGcy7cNM.mjs → ccjk.BDKUdmLk.mjs} +1 -1
- package/dist/shared/{ccjk.DtMBiwVG.mjs → ccjk.BFxsJM0k.mjs} +1 -1
- package/dist/shared/{ccjk.j4uut26D.mjs → ccjk.BIxuVL3_.mjs} +5 -5
- package/dist/shared/ccjk.BRZ9ww8S.mjs +142 -0
- package/dist/shared/{ccjk.CN0edl87.mjs → ccjk.BSYWk9ML.mjs} +1 -1
- package/dist/shared/{ccjk.Dk1HDseQ.mjs → ccjk.BnpWvs9V.mjs} +75 -75
- package/dist/shared/ccjk.BoApaI4j.mjs +28 -0
- package/dist/shared/{ccjk.DKojSRzw.mjs → ccjk.BrPUmTqm.mjs} +1 -1
- package/dist/shared/{ccjk.C10pepYx.mjs → ccjk.BxSmJ8B7.mjs} +1 -1
- package/dist/shared/ccjk.Bx_rmYfN.mjs +69 -0
- package/dist/shared/ccjk.COweQ1RR.mjs +5 -0
- package/dist/shared/{ccjk.BN90X6oc.mjs → ccjk.CePkJq2S.mjs} +17 -17
- package/dist/shared/{ccjk.Bvoex4TZ.mjs → ccjk.CfKKcvWy.mjs} +1 -1
- package/dist/shared/ccjk.Cjgrln_h.mjs +297 -0
- package/dist/shared/ccjk.CxpGa6MC.mjs +2724 -0
- package/dist/shared/{ccjk.DfwJOEok.mjs → ccjk.D5MFQT7w.mjs} +1 -1
- package/dist/shared/{ccjk.cChAaGgT.mjs → ccjk.DG_o24cZ.mjs} +6 -6
- package/dist/shared/{ccjk.bhFAMRyc.mjs → ccjk.DLLw-h4Y.mjs} +32 -32
- package/dist/shared/ccjk.DOwtZMk8.mjs +4019 -0
- package/dist/shared/{ccjk.BsXQugfY.mjs → ccjk.DTdjs-qK.mjs} +13 -13
- package/dist/shared/{ccjk.Bdhyg3X-.mjs → ccjk.DsYaCCx4.mjs} +1 -1
- package/dist/shared/ccjk.KfSWcGlE.mjs +38 -0
- package/dist/shared/ccjk.RyizuzOI.mjs +21 -0
- package/dist/shared/{ccjk.h7_W-wTs.mjs → ccjk.SPoXMvZD.mjs} +1 -1
- package/dist/shared/ccjk.T_cX87dY.mjs +15 -0
- package/dist/shared/{ccjk.CrB6OYHv.mjs → ccjk._dESH4Rk.mjs} +2 -2
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +249 -0
- package/dist/shared/{ccjk.CBhIZiPz.mjs → ccjk.hoqrwWdN.mjs} +1 -1
- package/dist/shared/{ccjk.BNwRnWYx.mjs → ccjk.s7OCVzdd.mjs} +1230 -33
- package/dist/shared/{ccjk.BOIUTf5z.mjs → ccjk.waa2ikKJ.mjs} +8 -9
- package/package.json +31 -30
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { exec } from 'node:child_process';
|
|
2
|
-
import * as
|
|
2
|
+
import * as fs from 'node:fs';
|
|
3
3
|
import * as path from 'node:path';
|
|
4
4
|
import process__default from 'node:process';
|
|
5
5
|
import { promisify } from 'node:util';
|
|
6
|
-
import
|
|
6
|
+
import { s as semverExports } from '../shared/ccjk.CxpGa6MC.mjs';
|
|
7
7
|
import { g as getPlatform, f as findCommandPath, a as getHomebrewCommandPaths } from './platform.mjs';
|
|
8
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
8
9
|
import 'node:os';
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
10
|
+
import './main.mjs';
|
|
11
|
+
import 'module';
|
|
12
|
+
import 'node:stream';
|
|
13
|
+
import 'node:readline';
|
|
14
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
11
15
|
|
|
12
16
|
function getHome() {
|
|
13
17
|
return process__default.env.HOME || process__default.env.USERPROFILE || "";
|
|
@@ -190,8 +194,8 @@ function findInstallationByCommonPaths(platform) {
|
|
|
190
194
|
const sortedSources = [...INSTALLATION_SOURCES].filter((s) => s.platforms.includes(platform)).sort((a, b) => b.priority - a.priority);
|
|
191
195
|
for (const source of sortedSources) {
|
|
192
196
|
for (const commonPath of source.commonPaths) {
|
|
193
|
-
if (
|
|
194
|
-
const stats =
|
|
197
|
+
if (fs.existsSync(commonPath)) {
|
|
198
|
+
const stats = fs.statSync(commonPath);
|
|
195
199
|
if (stats.isDirectory()) {
|
|
196
200
|
const possibleBinaries = findClaudeBinaryInDirectory(commonPath);
|
|
197
201
|
if (possibleBinaries.length > 0) {
|
|
@@ -210,7 +214,7 @@ function findClaudeBinaryInDirectory(dir, depth = 0) {
|
|
|
210
214
|
return [];
|
|
211
215
|
const results = [];
|
|
212
216
|
try {
|
|
213
|
-
const entries =
|
|
217
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
214
218
|
for (const entry of entries) {
|
|
215
219
|
const fullPath = path.join(dir, entry.name);
|
|
216
220
|
if (entry.isFile() && entry.name === "claude") {
|
|
@@ -292,9 +296,9 @@ async function getClaudeCodeInstallationSource() {
|
|
|
292
296
|
if (!commandPath) {
|
|
293
297
|
const commonPaths = getCommonPathsForPlatform(platform);
|
|
294
298
|
for (const path of commonPaths) {
|
|
295
|
-
if (
|
|
299
|
+
if (fs.existsSync(path)) {
|
|
296
300
|
try {
|
|
297
|
-
const stats =
|
|
301
|
+
const stats = fs.statSync(path);
|
|
298
302
|
if (stats.isFile()) {
|
|
299
303
|
commandPath = path;
|
|
300
304
|
break;
|
|
@@ -347,15 +351,15 @@ function mapSourceType(type) {
|
|
|
347
351
|
}
|
|
348
352
|
function isSymlinkBroken(symlinkPath) {
|
|
349
353
|
try {
|
|
350
|
-
const lstats =
|
|
354
|
+
const lstats = fs.lstatSync(symlinkPath);
|
|
351
355
|
if (!lstats.isSymbolicLink()) {
|
|
352
356
|
return false;
|
|
353
357
|
}
|
|
354
|
-
|
|
358
|
+
fs.statSync(symlinkPath);
|
|
355
359
|
return false;
|
|
356
360
|
} catch {
|
|
357
361
|
try {
|
|
358
|
-
|
|
362
|
+
fs.lstatSync(symlinkPath);
|
|
359
363
|
return true;
|
|
360
364
|
} catch {
|
|
361
365
|
return false;
|
|
@@ -380,7 +384,7 @@ async function fixBrokenNpmSymlink() {
|
|
|
380
384
|
];
|
|
381
385
|
let packageCliPath = null;
|
|
382
386
|
for (const path of npmPackagePaths) {
|
|
383
|
-
if (
|
|
387
|
+
if (fs.existsSync(path)) {
|
|
384
388
|
packageCliPath = path;
|
|
385
389
|
break;
|
|
386
390
|
}
|
|
@@ -391,8 +395,8 @@ async function fixBrokenNpmSymlink() {
|
|
|
391
395
|
for (const symlinkPath of symlinkPaths) {
|
|
392
396
|
if (isSymlinkBroken(symlinkPath)) {
|
|
393
397
|
try {
|
|
394
|
-
|
|
395
|
-
|
|
398
|
+
fs.unlinkSync(symlinkPath);
|
|
399
|
+
fs.symlinkSync(packageCliPath, symlinkPath);
|
|
396
400
|
return {
|
|
397
401
|
fixed: true,
|
|
398
402
|
message: `Fixed broken symlink: ${symlinkPath} -> ${packageCliPath}`
|
|
@@ -407,11 +411,11 @@ async function fixBrokenNpmSymlink() {
|
|
|
407
411
|
}
|
|
408
412
|
const commandPath = await findCommandPath("claude");
|
|
409
413
|
if (!commandPath) {
|
|
410
|
-
const binDir =
|
|
414
|
+
const binDir = fs.existsSync("/opt/homebrew/bin") ? "/opt/homebrew/bin" : "/usr/local/bin";
|
|
411
415
|
const newSymlinkPath = path.join(binDir, "claude");
|
|
412
416
|
try {
|
|
413
|
-
if (!
|
|
414
|
-
|
|
417
|
+
if (!fs.existsSync(newSymlinkPath)) {
|
|
418
|
+
fs.symlinkSync(packageCliPath, newSymlinkPath);
|
|
415
419
|
return {
|
|
416
420
|
fixed: true,
|
|
417
421
|
message: `Created new symlink: ${newSymlinkPath} -> ${packageCliPath}`
|
|
@@ -463,7 +467,7 @@ async function detectAllClaudeCodeInstallations() {
|
|
|
463
467
|
if (checkedPaths.has(resolvedPath))
|
|
464
468
|
return;
|
|
465
469
|
checkedPaths.add(resolvedPath);
|
|
466
|
-
if (!
|
|
470
|
+
if (!fs.existsSync(path))
|
|
467
471
|
return;
|
|
468
472
|
const version = await getVersionFromPath(path);
|
|
469
473
|
installations.push({
|
|
@@ -473,7 +477,7 @@ async function detectAllClaudeCodeInstallations() {
|
|
|
473
477
|
isActive: isActivePath(path) || isActivePath(resolvedPath)
|
|
474
478
|
});
|
|
475
479
|
}
|
|
476
|
-
if (activeCommandPath &&
|
|
480
|
+
if (activeCommandPath && fs.existsSync(activeCommandPath)) {
|
|
477
481
|
let activeSource = "other";
|
|
478
482
|
if (activeResolvedPath?.includes("/Caskroom/claude-code/")) {
|
|
479
483
|
activeSource = "homebrew-cask";
|
|
@@ -496,8 +500,8 @@ async function detectAllClaudeCodeInstallations() {
|
|
|
496
500
|
const homebrewPrefixes = ["/opt/homebrew", "/usr/local"];
|
|
497
501
|
for (const prefix of homebrewPrefixes) {
|
|
498
502
|
const caskroomPath = `${prefix}/Caskroom/claude-code`;
|
|
499
|
-
if (
|
|
500
|
-
const versions =
|
|
503
|
+
if (fs.existsSync(caskroomPath)) {
|
|
504
|
+
const versions = fs.readdirSync(caskroomPath).filter((v) => !v.startsWith("."));
|
|
501
505
|
for (const version of versions) {
|
|
502
506
|
const claudePath = `${caskroomPath}/${version}/claude`;
|
|
503
507
|
await addInstallation(claudePath, "homebrew-cask");
|
|
@@ -518,10 +522,10 @@ async function detectAllClaudeCodeInstallations() {
|
|
|
518
522
|
let exists = false;
|
|
519
523
|
let isBrokenSymlink = false;
|
|
520
524
|
try {
|
|
521
|
-
if (
|
|
525
|
+
if (fs.existsSync(path$1)) {
|
|
522
526
|
exists = true;
|
|
523
527
|
} else {
|
|
524
|
-
const stats =
|
|
528
|
+
const stats = fs.lstatSync(path$1);
|
|
525
529
|
if (stats.isSymbolicLink()) {
|
|
526
530
|
isBrokenSymlink = true;
|
|
527
531
|
}
|
|
@@ -539,11 +543,11 @@ async function detectAllClaudeCodeInstallations() {
|
|
|
539
543
|
await addInstallation(path$1, "npm");
|
|
540
544
|
} else if (resolvedPath.includes("/Caskroom/")) ; else if (isBrokenSymlink) {
|
|
541
545
|
const potentialLibPath = path$1.replace("/bin/claude", "/lib/node_modules/@anthropic-ai/claude-code");
|
|
542
|
-
if (
|
|
546
|
+
if (fs.existsSync(potentialLibPath)) {
|
|
543
547
|
try {
|
|
544
548
|
const pkgJsonPath = path.join(potentialLibPath, "package.json");
|
|
545
|
-
if (
|
|
546
|
-
const pkg = JSON.parse(
|
|
549
|
+
if (fs.existsSync(pkgJsonPath)) {
|
|
550
|
+
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf8"));
|
|
547
551
|
installations.push({
|
|
548
552
|
source: "npm",
|
|
549
553
|
path: path$1,
|
|
@@ -568,16 +572,16 @@ async function detectAllClaudeCodeInstallations() {
|
|
|
568
572
|
`${process__default.env.HOME}/.npm-global/lib/node_modules/@anthropic-ai/claude-code`
|
|
569
573
|
];
|
|
570
574
|
for (const libPath of globalModulesPaths) {
|
|
571
|
-
if (
|
|
575
|
+
if (fs.existsSync(libPath) && !checkedPaths.has(libPath)) {
|
|
572
576
|
try {
|
|
573
577
|
const pkgJsonPath = path.join(libPath, "package.json");
|
|
574
|
-
if (
|
|
575
|
-
const pkg = JSON.parse(
|
|
578
|
+
if (fs.existsSync(pkgJsonPath)) {
|
|
579
|
+
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf8"));
|
|
576
580
|
const binPath = libPath.replace("/lib/node_modules/@anthropic-ai/claude-code", "/bin/claude");
|
|
577
581
|
if (!checkedPaths.has(binPath)) {
|
|
578
582
|
installations.push({
|
|
579
583
|
source: "npm",
|
|
580
|
-
path:
|
|
584
|
+
path: fs.existsSync(binPath) ? binPath : libPath,
|
|
581
585
|
// Use bin path if exists, else lib path
|
|
582
586
|
version: pkg.version,
|
|
583
587
|
isActive: false
|
|
@@ -593,9 +597,9 @@ async function detectAllClaudeCodeInstallations() {
|
|
|
593
597
|
const homebrewPrefixes = ["/opt/homebrew", "/usr/local"];
|
|
594
598
|
for (const prefix of homebrewPrefixes) {
|
|
595
599
|
const cellarNodePath = `${prefix}/Cellar/node`;
|
|
596
|
-
if (
|
|
600
|
+
if (fs.existsSync(cellarNodePath)) {
|
|
597
601
|
try {
|
|
598
|
-
const versions =
|
|
602
|
+
const versions = fs.readdirSync(cellarNodePath);
|
|
599
603
|
for (const version of versions) {
|
|
600
604
|
const claudePath = `${cellarNodePath}/${version}/bin/claude`;
|
|
601
605
|
await addInstallation(claudePath, "npm-homebrew-node");
|
|
@@ -636,7 +640,7 @@ function getSourceDisplayName(source, i18n) {
|
|
|
636
640
|
return sourceMap[source] || source;
|
|
637
641
|
}
|
|
638
642
|
async function performNpmRemovalAndActivateHomebrew(_npmInstallation, homebrewInstallation, tinyExec, i18n, ansis) {
|
|
639
|
-
const ora = (await import('
|
|
643
|
+
const ora = (await import('./index7.mjs')).default;
|
|
640
644
|
const spinner = ora(i18n.t("installation:removingDuplicateInstallation")).start();
|
|
641
645
|
try {
|
|
642
646
|
const { wrapCommandWithSudo } = await import('./platform.mjs').then(function (n) { return n.p; });
|
|
@@ -659,7 +663,7 @@ async function performNpmRemovalAndActivateHomebrew(_npmInstallation, homebrewIn
|
|
|
659
663
|
if (symlinkResult.error) {
|
|
660
664
|
console.log(ansis.gray(` ${symlinkResult.error}`));
|
|
661
665
|
} else {
|
|
662
|
-
const homebrewBin =
|
|
666
|
+
const homebrewBin = fs.existsSync("/opt/homebrew/bin") ? "/opt/homebrew/bin" : "/usr/local/bin";
|
|
663
667
|
console.log(ansis.gray(` sudo ln -sf "${homebrewInstallation.path}" ${homebrewBin}/claude`));
|
|
664
668
|
}
|
|
665
669
|
}
|
|
@@ -674,8 +678,8 @@ async function performNpmRemovalAndActivateHomebrew(_npmInstallation, homebrewIn
|
|
|
674
678
|
}
|
|
675
679
|
}
|
|
676
680
|
async function handleDuplicateInstallations(skipPrompt = false) {
|
|
677
|
-
const { ensureI18nInitialized, format, i18n } = await import('./
|
|
678
|
-
const ansis = (await import('
|
|
681
|
+
const { ensureI18nInitialized, format, i18n } = await import('./index5.mjs');
|
|
682
|
+
const ansis = (await import('./index2.mjs')).default;
|
|
679
683
|
ensureI18nInitialized();
|
|
680
684
|
const duplicateInfo = await checkDuplicateInstallations();
|
|
681
685
|
if (!duplicateInfo.hasDuplicates) {
|
|
@@ -723,7 +727,7 @@ async function handleDuplicateInstallations(skipPrompt = false) {
|
|
|
723
727
|
if (!npmInstallation) {
|
|
724
728
|
return { hadDuplicates: true, resolved: false, action: "kept-both" };
|
|
725
729
|
}
|
|
726
|
-
const { exec: tinyExec } = await import('
|
|
730
|
+
const { exec: tinyExec } = await import('./main.mjs');
|
|
727
731
|
if (skipPrompt) {
|
|
728
732
|
console.log(ansis.green(`\u{1F504} ${i18n.t("installation:autoRemovingNpm")}`));
|
|
729
733
|
return await performNpmRemovalAndActivateHomebrew(
|
|
@@ -734,7 +738,7 @@ async function handleDuplicateInstallations(skipPrompt = false) {
|
|
|
734
738
|
ansis
|
|
735
739
|
);
|
|
736
740
|
}
|
|
737
|
-
const inquirer = (await import('
|
|
741
|
+
const inquirer = (await import('./index3.mjs').then(function (n) { return n.c; })).default;
|
|
738
742
|
const sourceDisplayName = getSourceDisplayName(npmInstallation.source, i18n);
|
|
739
743
|
const confirmMessage = format(i18n.t("installation:confirmRemoveDuplicate"), { source: sourceDisplayName });
|
|
740
744
|
const { action } = await inquirer.prompt([
|
|
@@ -779,10 +783,10 @@ async function getHomebrewClaudeCodeVersion() {
|
|
|
779
783
|
}
|
|
780
784
|
}
|
|
781
785
|
function compareVersions(current, latest) {
|
|
782
|
-
if (!
|
|
786
|
+
if (!semverExports.valid(current) || !semverExports.valid(latest)) {
|
|
783
787
|
return -1;
|
|
784
788
|
}
|
|
785
|
-
return
|
|
789
|
+
return semverExports.compare(current, latest);
|
|
786
790
|
}
|
|
787
791
|
function shouldUpdate(current, latest) {
|
|
788
792
|
return compareVersions(current, latest) < 0;
|
package/dist/chunks/vim.mjs
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import inquirer from '
|
|
3
|
-
import { ensureI18nInitialized, i18n } from './
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i as inquirer } from './index3.mjs';
|
|
3
|
+
import { ensureI18nInitialized, i18n } from './index5.mjs';
|
|
4
4
|
import { existsSync, readFileSync } from 'node:fs';
|
|
5
5
|
import { readFile, writeFile, mkdir } from 'node:fs/promises';
|
|
6
6
|
import { homedir } from 'node:os';
|
|
7
7
|
import process__default from 'node:process';
|
|
8
|
-
import { join } from '
|
|
8
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
9
9
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
10
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
11
|
+
import 'node:readline';
|
|
12
|
+
import 'stream';
|
|
13
|
+
import 'node:tty';
|
|
14
|
+
import 'node:async_hooks';
|
|
15
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
16
|
+
import 'node:util';
|
|
17
|
+
import 'tty';
|
|
18
|
+
import 'fs';
|
|
19
|
+
import 'child_process';
|
|
20
|
+
import 'node:path';
|
|
21
|
+
import 'node:crypto';
|
|
22
|
+
import 'buffer';
|
|
23
|
+
import 'string_decoder';
|
|
10
24
|
import 'node:url';
|
|
11
|
-
import 'i18next';
|
|
12
|
-
import 'i18next-fs-backend';
|
|
13
25
|
|
|
14
26
|
const DEFAULT_VIM_CONFIG = {
|
|
15
27
|
enabled: false,
|
|
@@ -60,7 +72,7 @@ class VimModeManager {
|
|
|
60
72
|
await mkdir(dir, { recursive: true });
|
|
61
73
|
await writeFile(this.configPath, JSON.stringify(this.config, null, 2), "utf-8");
|
|
62
74
|
} catch (error) {
|
|
63
|
-
console.error(
|
|
75
|
+
console.error(a.red(`Failed to save vim config: ${error}`));
|
|
64
76
|
}
|
|
65
77
|
}
|
|
66
78
|
getConfig() {
|
|
@@ -322,7 +334,7 @@ ${vimConfig}`;
|
|
|
322
334
|
await writeFile(inputrcPath, newContent, "utf-8");
|
|
323
335
|
return true;
|
|
324
336
|
} catch (error) {
|
|
325
|
-
console.error(
|
|
337
|
+
console.error(a.red(`Failed to install vim keybindings: ${error}`));
|
|
326
338
|
return false;
|
|
327
339
|
}
|
|
328
340
|
}
|
|
@@ -340,7 +352,7 @@ async function uninstallVimKeybindings() {
|
|
|
340
352
|
`, "utf-8");
|
|
341
353
|
return true;
|
|
342
354
|
} catch (error) {
|
|
343
|
-
console.error(
|
|
355
|
+
console.error(a.red(`Failed to uninstall vim keybindings: ${error}`));
|
|
344
356
|
return false;
|
|
345
357
|
}
|
|
346
358
|
}
|
|
@@ -521,8 +533,8 @@ function formatCommand(command, lang = "en") {
|
|
|
521
533
|
async function showVimStatus(lang = "en") {
|
|
522
534
|
const isZh = lang === "zh-CN";
|
|
523
535
|
console.log("");
|
|
524
|
-
console.log(
|
|
525
|
-
console.log(
|
|
536
|
+
console.log(a.bold(isZh ? "\u{1F4CA} Vim \u6A21\u5F0F\u72B6\u6001" : "\u{1F4CA} Vim Mode Status"));
|
|
537
|
+
console.log(a.dim("\u2500".repeat(50)));
|
|
526
538
|
const manager = createVimModeManager();
|
|
527
539
|
const config = manager.getConfig();
|
|
528
540
|
const isInstalled = isVimKeybindingsInstalled();
|
|
@@ -530,26 +542,26 @@ async function showVimStatus(lang = "en") {
|
|
|
530
542
|
const statusColor = config.enabled ? "green" : "yellow";
|
|
531
543
|
const statusText = config.enabled ? isZh ? "\u5DF2\u542F\u7528" : "Enabled" : isZh ? "\u5DF2\u7981\u7528" : "Disabled";
|
|
532
544
|
console.log(`
|
|
533
|
-
${
|
|
545
|
+
${a[statusColor].bold("\u25CF")} ${a.bold(isZh ? "\u72B6\u6001:" : "Status:")} ${statusText}`);
|
|
534
546
|
const keybindingsColor = isInstalled ? "green" : "yellow";
|
|
535
547
|
const keybindingsText = isInstalled ? isZh ? "\u5DF2\u5B89\u88C5" : "Installed" : isZh ? "\u672A\u5B89\u88C5" : "Not Installed";
|
|
536
|
-
console.log(`${
|
|
548
|
+
console.log(`${a[keybindingsColor].bold("\u25CF")} ${a.bold(isZh ? "\u5FEB\u6377\u952E:" : "Keybindings:")} ${keybindingsText}`);
|
|
537
549
|
console.log("");
|
|
538
|
-
console.log(
|
|
539
|
-
console.log(` ${
|
|
540
|
-
console.log(` ${
|
|
541
|
-
console.log(` ${
|
|
542
|
-
console.log(` ${
|
|
543
|
-
console.log(` ${
|
|
544
|
-
console.log(` ${
|
|
545
|
-
console.log(` ${
|
|
550
|
+
console.log(a.bold(isZh ? "\u2699\uFE0F \u914D\u7F6E:" : "\u2699\uFE0F Configuration:"));
|
|
551
|
+
console.log(` ${a.dim("\u2500")}`);
|
|
552
|
+
console.log(` ${a.cyan("Mode Indicator:")} ${config.showModeIndicator ? isZh ? "\u5F00\u542F" : "On" : isZh ? "\u5173\u95ED" : "Off"}`);
|
|
553
|
+
console.log(` ${a.cyan("Auto Indent:")} ${config.autoIndent ? isZh ? "\u5F00\u542F" : "On" : isZh ? "\u5173\u95ED" : "Off"}`);
|
|
554
|
+
console.log(` ${a.cyan("Expand Tab:")} ${config.expandTab ? isZh ? "\u5F00\u542F" : "On" : isZh ? "\u5173\u95ED" : "Off"}`);
|
|
555
|
+
console.log(` ${a.cyan("Tab Width:")} ${config.tabWidth}`);
|
|
556
|
+
console.log(` ${a.cyan("Smart Case:")} ${config.smartCase ? isZh ? "\u5F00\u542F" : "On" : isZh ? "\u5173\u95ED" : "Off"}`);
|
|
557
|
+
console.log(` ${a.cyan("Language:")} ${config.lang}`);
|
|
546
558
|
console.log("");
|
|
547
|
-
console.log(
|
|
548
|
-
console.log(` ${
|
|
549
|
-
console.log(` ${
|
|
559
|
+
console.log(a.bold(isZh ? "\u{1F4C1} \u6587\u4EF6\u4F4D\u7F6E:" : "\u{1F4C1} File Location:"));
|
|
560
|
+
console.log(` ${a.dim("\u2500")}`);
|
|
561
|
+
console.log(` ${a.cyan("InputRC:")} ${inputrcPath}`);
|
|
550
562
|
if (isInstalled) {
|
|
551
563
|
console.log("");
|
|
552
|
-
console.log(
|
|
564
|
+
console.log(a.yellow(isZh ? "\u{1F4A1} \u63D0\u793A: \u4FEE\u6539\u540E\u9700\u8981\u8FD0\u884C `source ~/.inputrc` \u6216\u91CD\u542F\u7EC8\u7AEF" : "\u{1F4A1} Tip: Run `source ~/.inputrc` or restart terminal after changes"));
|
|
553
565
|
}
|
|
554
566
|
console.log("");
|
|
555
567
|
}
|
|
@@ -560,10 +572,10 @@ async function toggleVimMode(lang = "en") {
|
|
|
560
572
|
await manager.updateConfig(config);
|
|
561
573
|
const isZh = lang === "zh-CN";
|
|
562
574
|
const statusText = config.enabled ? isZh ? "\u5DF2\u542F\u7528" : "enabled" : isZh ? "\u5DF2\u7981\u7528" : "disabled";
|
|
563
|
-
console.log(
|
|
575
|
+
console.log(a.green(`\u2713 Vim mode ${statusText}`));
|
|
564
576
|
if (config.enabled && !isVimKeybindingsInstalled()) {
|
|
565
577
|
console.log("");
|
|
566
|
-
console.log(
|
|
578
|
+
console.log(a.yellow(isZh ? "\u26A0\uFE0F Vim \u6A21\u5F0F\u5FEB\u6377\u952E\u5C1A\u672A\u5B89\u88C5" : "\u26A0\uFE0F Vim mode keybindings not installed"));
|
|
567
579
|
const { install } = await inquirer.prompt({
|
|
568
580
|
type: "confirm",
|
|
569
581
|
name: "install",
|
|
@@ -580,52 +592,52 @@ async function enableVimMode(lang = "en") {
|
|
|
580
592
|
const config = manager.getConfig();
|
|
581
593
|
if (config.enabled) {
|
|
582
594
|
const isZh2 = lang === "zh-CN";
|
|
583
|
-
console.log(
|
|
595
|
+
console.log(a.yellow(isZh2 ? "Vim \u6A21\u5F0F\u5DF2\u7ECF\u662F\u542F\u7528\u72B6\u6001" : "Vim mode is already enabled"));
|
|
584
596
|
return;
|
|
585
597
|
}
|
|
586
598
|
config.enabled = true;
|
|
587
599
|
await manager.updateConfig(config);
|
|
588
600
|
const isZh = lang === "zh-CN";
|
|
589
|
-
console.log(
|
|
601
|
+
console.log(a.green(isZh ? "\u2713 Vim \u6A21\u5F0F\u5DF2\u542F\u7528" : "\u2713 Vim mode enabled"));
|
|
590
602
|
}
|
|
591
603
|
async function disableVimMode(lang = "en") {
|
|
592
604
|
const manager = createVimModeManager();
|
|
593
605
|
const config = manager.getConfig();
|
|
594
606
|
if (!config.enabled) {
|
|
595
607
|
const isZh2 = lang === "zh-CN";
|
|
596
|
-
console.log(
|
|
608
|
+
console.log(a.yellow(isZh2 ? "Vim \u6A21\u5F0F\u5DF2\u7ECF\u662F\u7981\u7528\u72B6\u6001" : "Vim mode is already disabled"));
|
|
597
609
|
return;
|
|
598
610
|
}
|
|
599
611
|
config.enabled = false;
|
|
600
612
|
await manager.updateConfig(config);
|
|
601
613
|
const isZh = lang === "zh-CN";
|
|
602
|
-
console.log(
|
|
614
|
+
console.log(a.green(isZh ? "\u2713 Vim \u6A21\u5F0F\u5DF2\u7981\u7528" : "\u2713 Vim mode disabled"));
|
|
603
615
|
}
|
|
604
616
|
async function doInstallKeybindings(lang = "en") {
|
|
605
617
|
const isZh = lang === "zh-CN";
|
|
606
618
|
console.log("");
|
|
607
|
-
console.log(
|
|
619
|
+
console.log(a.cyan(isZh ? "\u{1F4E6} \u5B89\u88C5 Vim \u5FEB\u6377\u952E\u5230 .inputrc..." : "\u{1F4E6} Installing Vim keybindings to .inputrc..."));
|
|
608
620
|
const manager = createVimModeManager();
|
|
609
621
|
const config = manager.getConfig();
|
|
610
622
|
const success = await installVimKeybindings(config);
|
|
611
623
|
if (success) {
|
|
612
|
-
console.log(
|
|
624
|
+
console.log(a.green(isZh ? "\u2713 \u5FEB\u6377\u952E\u5B89\u88C5\u6210\u529F!" : "\u2713 Keybindings installed successfully!"));
|
|
613
625
|
console.log("");
|
|
614
|
-
console.log(
|
|
615
|
-
console.log(
|
|
626
|
+
console.log(a.yellow(isZh ? "\u{1F4A1} \u8FD0\u884C\u4EE5\u4E0B\u547D\u4EE4\u4F7F\u914D\u7F6E\u751F\u6548:" : "\u{1F4A1} Run the following command to apply changes:"));
|
|
627
|
+
console.log(a.cyan(" source ~/.inputrc"));
|
|
616
628
|
} else {
|
|
617
|
-
console.log(
|
|
629
|
+
console.log(a.red(isZh ? "\u2717 \u5FEB\u6377\u952E\u5B89\u88C5\u5931\u8D25" : "\u2717 Keybindings installation failed"));
|
|
618
630
|
}
|
|
619
631
|
}
|
|
620
632
|
async function doUninstallKeybindings(lang = "en") {
|
|
621
633
|
const isZh = lang === "zh-CN";
|
|
622
634
|
console.log("");
|
|
623
|
-
console.log(
|
|
635
|
+
console.log(a.cyan(isZh ? "\u{1F5D1}\uFE0F \u4ECE .inputrc \u5378\u8F7D Vim \u5FEB\u6377\u952E..." : "\u{1F5D1}\uFE0F Uninstalling Vim keybindings from .inputrc..."));
|
|
624
636
|
const success = await uninstallVimKeybindings();
|
|
625
637
|
if (success) {
|
|
626
|
-
console.log(
|
|
638
|
+
console.log(a.green(isZh ? "\u2713 \u5FEB\u6377\u952E\u5DF2\u5378\u8F7D" : "\u2713 Keybindings uninstalled"));
|
|
627
639
|
} else {
|
|
628
|
-
console.log(
|
|
640
|
+
console.log(a.red(isZh ? "\u2717 \u5FEB\u6377\u952E\u5378\u8F7D\u5931\u8D25" : "\u2717 Keybindings uninstallation failed"));
|
|
629
641
|
}
|
|
630
642
|
}
|
|
631
643
|
async function showVimConfigMenu(lang = "en") {
|
|
@@ -635,42 +647,42 @@ async function showVimConfigMenu(lang = "en") {
|
|
|
635
647
|
while (true) {
|
|
636
648
|
const choices = addNumbersToChoices([
|
|
637
649
|
{
|
|
638
|
-
name: `${config.showModeIndicator ?
|
|
650
|
+
name: `${config.showModeIndicator ? a.green("\u25CF") : a.gray("\u25CB")} ${isZh ? "\u663E\u793A\u6A21\u5F0F\u6307\u793A\u5668" : "Show Mode Indicator"}`,
|
|
639
651
|
value: "showModeIndicator",
|
|
640
652
|
short: "Mode Indicator"
|
|
641
653
|
},
|
|
642
654
|
{
|
|
643
|
-
name: `${config.autoIndent ?
|
|
655
|
+
name: `${config.autoIndent ? a.green("\u25CF") : a.gray("\u25CB")} ${isZh ? "\u81EA\u52A8\u7F29\u8FDB" : "Auto Indent"}`,
|
|
644
656
|
value: "autoIndent",
|
|
645
657
|
short: "Auto Indent"
|
|
646
658
|
},
|
|
647
659
|
{
|
|
648
|
-
name: `${config.expandTab ?
|
|
660
|
+
name: `${config.expandTab ? a.green("\u25CF") : a.gray("\u25CB")} ${isZh ? "\u7A7A\u683C\u4EE3\u66FF Tab" : "Expand Tab"}`,
|
|
649
661
|
value: "expandTab",
|
|
650
662
|
short: "Expand Tab"
|
|
651
663
|
},
|
|
652
664
|
{
|
|
653
|
-
name: ` ${isZh ? "Tab \u5BBD\u5EA6" : "Tab Width"}: ${
|
|
665
|
+
name: ` ${isZh ? "Tab \u5BBD\u5EA6" : "Tab Width"}: ${a.cyan(config.tabWidth.toString())}`,
|
|
654
666
|
value: "tabWidth",
|
|
655
667
|
short: "Tab Width"
|
|
656
668
|
},
|
|
657
669
|
{
|
|
658
|
-
name: `${config.smartCase ?
|
|
670
|
+
name: `${config.smartCase ? a.green("\u25CF") : a.gray("\u25CB")} ${isZh ? "\u667A\u80FD\u5927\u5C0F\u5199" : "Smart Case"}`,
|
|
659
671
|
value: "smartCase",
|
|
660
672
|
short: "Smart Case"
|
|
661
673
|
},
|
|
662
674
|
{
|
|
663
|
-
name: ` ${isZh ? "\u8BED\u8A00" : "Language"}: ${
|
|
675
|
+
name: ` ${isZh ? "\u8BED\u8A00" : "Language"}: ${a.cyan(config.lang)}`,
|
|
664
676
|
value: "language",
|
|
665
677
|
short: "Language"
|
|
666
678
|
},
|
|
667
679
|
{
|
|
668
|
-
name:
|
|
680
|
+
name: a.green(isZh ? "\u5E94\u7528\u66F4\u6539" : "Apply Changes"),
|
|
669
681
|
value: "apply",
|
|
670
682
|
short: isZh ? "\u5E94\u7528" : "Apply"
|
|
671
683
|
},
|
|
672
684
|
{
|
|
673
|
-
name:
|
|
685
|
+
name: a.yellow(isZh ? "\u53D6\u6D88" : "Cancel"),
|
|
674
686
|
value: "cancel",
|
|
675
687
|
short: isZh ? "\u53D6\u6D88" : "Cancel"
|
|
676
688
|
}
|
|
@@ -681,7 +693,7 @@ async function showVimConfigMenu(lang = "en") {
|
|
|
681
693
|
message: isZh ? "\u9009\u62E9\u914D\u7F6E\u9879:" : "Select configuration option:",
|
|
682
694
|
choices: [
|
|
683
695
|
...choices.slice(0, -2),
|
|
684
|
-
new inquirer.Separator(
|
|
696
|
+
new inquirer.Separator(a.dim("\u2500".repeat(40))),
|
|
685
697
|
...choices.slice(-2)
|
|
686
698
|
]
|
|
687
699
|
});
|
|
@@ -690,7 +702,7 @@ async function showVimConfigMenu(lang = "en") {
|
|
|
690
702
|
}
|
|
691
703
|
if (choice === "apply") {
|
|
692
704
|
await manager.updateConfig(config);
|
|
693
|
-
console.log(
|
|
705
|
+
console.log(a.green(isZh ? "\u2713 \u914D\u7F6E\u5DF2\u4FDD\u5B58" : "\u2713 Configuration saved"));
|
|
694
706
|
break;
|
|
695
707
|
}
|
|
696
708
|
if (choice === "tabWidth") {
|
|
@@ -721,27 +733,27 @@ async function showVimConfigMenu(lang = "en") {
|
|
|
721
733
|
function testVimCommand(input, lang = "en") {
|
|
722
734
|
const isZh = lang === "zh-CN";
|
|
723
735
|
console.log("");
|
|
724
|
-
console.log(
|
|
725
|
-
console.log(
|
|
736
|
+
console.log(a.bold(isZh ? "\u{1F9EA} Vim \u547D\u4EE4\u6D4B\u8BD5" : "\u{1F9EA} Vim Command Test"));
|
|
737
|
+
console.log(a.dim(`Input: "${input}"`));
|
|
726
738
|
console.log("");
|
|
727
739
|
const valid = isValidVimCommand(input);
|
|
728
|
-
console.log(`${
|
|
740
|
+
console.log(`${a.cyan("Valid:")} ${valid ? a.green("Yes") : a.red("No")}`);
|
|
729
741
|
if (!valid) {
|
|
730
|
-
console.log(
|
|
742
|
+
console.log(a.yellow(isZh ? "\u65E0\u6548\u7684 Vim \u547D\u4EE4" : "Invalid Vim command"));
|
|
731
743
|
return;
|
|
732
744
|
}
|
|
733
745
|
const parsed = parseVimCommand(input);
|
|
734
746
|
if (parsed) {
|
|
735
747
|
console.log("");
|
|
736
|
-
console.log(
|
|
737
|
-
console.log(` ${
|
|
738
|
-
console.log(` ${
|
|
739
|
-
console.log(` ${
|
|
748
|
+
console.log(a.bold(isZh ? "\u89E3\u6790\u7ED3\u679C:" : "Parsed Result:"));
|
|
749
|
+
console.log(` ${a.cyan("Operator:")} ${parsed.operator || a.dim("none")}`);
|
|
750
|
+
console.log(` ${a.cyan("Motion:")} ${parsed.motion || a.dim("none")}`);
|
|
751
|
+
console.log(` ${a.cyan("Count:")} ${parsed.count || a.dim("none")}`);
|
|
740
752
|
if (parsed.textObject) {
|
|
741
|
-
console.log(` ${
|
|
753
|
+
console.log(` ${a.cyan("Text Object:")} ${parsed.textObject.inclusive ? "a" : "i"}${parsed.textObject.type}`);
|
|
742
754
|
}
|
|
743
755
|
const formatted = formatCommand(parsed, lang);
|
|
744
|
-
console.log(` ${
|
|
756
|
+
console.log(` ${a.cyan("Description:")} ${formatted}`);
|
|
745
757
|
}
|
|
746
758
|
console.log("");
|
|
747
759
|
}
|
|
@@ -796,43 +808,43 @@ async function showVimMenu(lang = "en") {
|
|
|
796
808
|
const isEnabled = config.enabled;
|
|
797
809
|
const isInstalled = isVimKeybindingsInstalled();
|
|
798
810
|
console.log("");
|
|
799
|
-
console.log(
|
|
800
|
-
console.log(
|
|
811
|
+
console.log(a.bold.cyan(isZh ? "\u2328\uFE0F CCJK Vim \u6A21\u5F0F\u914D\u7F6E" : "\u2328\uFE0F CCJK Vim Mode Configuration"));
|
|
812
|
+
console.log(a.dim("\u2500".repeat(50)));
|
|
801
813
|
const statusColor = isEnabled ? "green" : "yellow";
|
|
802
814
|
const statusText = isEnabled ? isZh ? "\u5DF2\u542F\u7528" : "Enabled" : isZh ? "\u5DF2\u7981\u7528" : "Disabled";
|
|
803
|
-
console.log(` ${
|
|
815
|
+
console.log(` ${a[statusColor]("\u25CF")} ${isZh ? "\u72B6\u6001" : "Status"}: ${statusText}`);
|
|
804
816
|
const installedColor = isInstalled ? "green" : "yellow";
|
|
805
817
|
const installedText = isInstalled ? isZh ? "\u5DF2\u5B89\u88C5" : "Installed" : isZh ? "\u672A\u5B89\u88C5" : "Not Installed";
|
|
806
|
-
console.log(` ${
|
|
818
|
+
console.log(` ${a[installedColor]("\u25CF")} ${isZh ? "\u5FEB\u6377\u952E" : "Keybindings"}: ${installedText}`);
|
|
807
819
|
console.log("");
|
|
808
820
|
const choices = addNumbersToChoices([
|
|
809
821
|
{
|
|
810
|
-
name: isEnabled ?
|
|
822
|
+
name: isEnabled ? a.yellow(isZh ? "\u{1F534} \u7981\u7528 Vim \u6A21\u5F0F" : "\u{1F534} Disable Vim Mode") : a.green(isZh ? "\u{1F7E2} \u542F\u7528 Vim \u6A21\u5F0F" : "\u{1F7E2} Enable Vim Mode"),
|
|
811
823
|
value: "toggle",
|
|
812
824
|
short: isZh ? "\u5207\u6362" : "Toggle"
|
|
813
825
|
},
|
|
814
826
|
{
|
|
815
|
-
name: isInstalled ?
|
|
827
|
+
name: isInstalled ? a.yellow(isZh ? "\u{1F5D1}\uFE0F \u5378\u8F7D\u5FEB\u6377\u952E" : "\u{1F5D1}\uFE0F Uninstall Keybindings") : a.green(isZh ? "\u{1F4E6} \u5B89\u88C5\u5FEB\u6377\u952E" : "\u{1F4E6} Install Keybindings"),
|
|
816
828
|
value: isInstalled ? "uninstall" : "install",
|
|
817
829
|
short: isInstalled ? isZh ? "\u5378\u8F7D" : "Uninstall" : isZh ? "\u5B89\u88C5" : "Install"
|
|
818
830
|
},
|
|
819
831
|
{
|
|
820
|
-
name:
|
|
832
|
+
name: a.cyan(isZh ? "\u2699\uFE0F \u914D\u7F6E\u9009\u9879" : "\u2699\uFE0F Configure Options"),
|
|
821
833
|
value: "config",
|
|
822
834
|
short: isZh ? "\u914D\u7F6E" : "Configure"
|
|
823
835
|
},
|
|
824
836
|
{
|
|
825
|
-
name:
|
|
837
|
+
name: a.blue(isZh ? "\u{1F4CB} \u67E5\u770B\u5FEB\u6377\u952E\u53C2\u8003" : "\u{1F4CB} Keybinding Reference"),
|
|
826
838
|
value: "keys",
|
|
827
839
|
short: isZh ? "\u5FEB\u6377\u952E" : "Keys"
|
|
828
840
|
},
|
|
829
841
|
{
|
|
830
|
-
name:
|
|
842
|
+
name: a.magenta(isZh ? "\u{1F9EA} \u6D4B\u8BD5\u547D\u4EE4" : "\u{1F9EA} Test Command"),
|
|
831
843
|
value: "test",
|
|
832
844
|
short: isZh ? "\u6D4B\u8BD5" : "Test"
|
|
833
845
|
},
|
|
834
846
|
{
|
|
835
|
-
name:
|
|
847
|
+
name: a.gray(isZh ? "\u21A9\uFE0F \u8FD4\u56DE" : "\u21A9\uFE0F Back"),
|
|
836
848
|
value: "back",
|
|
837
849
|
short: isZh ? "\u8FD4\u56DE" : "Back"
|
|
838
850
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { c as chunkedExec } from '../shared/ccjk.T_cX87dY.mjs';
|
|
2
|
+
import 'node:util';
|
|
3
|
+
import 'node:child_process';
|
|
4
|
+
import 'node:url';
|
|
5
|
+
import '../shared/ccjk.KfSWcGlE.mjs';
|
|
6
|
+
|
|
7
|
+
// Binary source: https://github.com/sindresorhus/recycle-bin
|
|
8
|
+
const binary = new URL('windows-trash.exe', import.meta.url);
|
|
9
|
+
|
|
10
|
+
async function windows(paths) {
|
|
11
|
+
await chunkedExec(binary, paths, 200);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { windows as default };
|