ccsini 0.1.37 → 0.1.39
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/index.js +35 -34
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28018,7 +28018,7 @@ var {
|
|
|
28018
28018
|
} = import__.default;
|
|
28019
28019
|
|
|
28020
28020
|
// src/version.ts
|
|
28021
|
-
var VERSION = "0.1.
|
|
28021
|
+
var VERSION = "0.1.39";
|
|
28022
28022
|
|
|
28023
28023
|
// src/commands/init.ts
|
|
28024
28024
|
init_source();
|
|
@@ -29912,15 +29912,6 @@ function registerDoctorCommand(program2) {
|
|
|
29912
29912
|
|
|
29913
29913
|
// src/commands/self.ts
|
|
29914
29914
|
import { execSync } from "child_process";
|
|
29915
|
-
function detectInstalledWith() {
|
|
29916
|
-
try {
|
|
29917
|
-
const whichResult = execSync(process.platform === "win32" ? "where ccsini" : "which ccsini", { encoding: "utf-8" }).trim().split(`
|
|
29918
|
-
`)[0];
|
|
29919
|
-
if (whichResult.includes(".bun"))
|
|
29920
|
-
return "bun";
|
|
29921
|
-
} catch {}
|
|
29922
|
-
return "npm";
|
|
29923
|
-
}
|
|
29924
29915
|
function getLatestVersion() {
|
|
29925
29916
|
try {
|
|
29926
29917
|
const result = execSync("npm view ccsini version", { encoding: "utf-8" }).trim();
|
|
@@ -29944,8 +29935,7 @@ function registerSelfCommands(program2) {
|
|
|
29944
29935
|
console.log(`New version available: ${latest}`);
|
|
29945
29936
|
console.log(`Updating...
|
|
29946
29937
|
`);
|
|
29947
|
-
const
|
|
29948
|
-
const cmd = installedWith === "bun" ? `bun add -g ccsini@${latest} --force` : `npm install -g ccsini@${latest}`;
|
|
29938
|
+
const cmd = `npm install -g ccsini@${latest}`;
|
|
29949
29939
|
try {
|
|
29950
29940
|
execSync(cmd, { stdio: "inherit" });
|
|
29951
29941
|
console.log(`
|
|
@@ -30432,35 +30422,46 @@ async function showInteractiveMenu(program2) {
|
|
|
30432
30422
|
console.log(TAGLINE);
|
|
30433
30423
|
const configDir = getConfigDir();
|
|
30434
30424
|
const initialized = await configExists(configDir);
|
|
30435
|
-
const
|
|
30436
|
-
|
|
30437
|
-
{
|
|
30438
|
-
{
|
|
30439
|
-
{
|
|
30440
|
-
{
|
|
30441
|
-
{
|
|
30442
|
-
{
|
|
30443
|
-
{
|
|
30444
|
-
{ name: source_default.dim("Exit"), value: [] }
|
|
30425
|
+
const items = initialized ? [
|
|
30426
|
+
{ label: "Sync Push", desc: "Push local changes to cloud", args: ["sync", "push"] },
|
|
30427
|
+
{ label: "Sync Pull", desc: "Pull changes from cloud", args: ["sync", "pull"] },
|
|
30428
|
+
{ label: "Sync Status", desc: "Show sync status", args: ["sync", "status"] },
|
|
30429
|
+
{ label: "Sessions", desc: "Configure session sync", args: ["sessions", "status"] },
|
|
30430
|
+
{ label: "Doctor", desc: "Check system health", args: ["doctor"] },
|
|
30431
|
+
{ label: "Hooks Fix", desc: "Repair broken hooks", args: ["hooks", "fix"] },
|
|
30432
|
+
{ label: "Help", desc: "Show all commands", args: ["--help"] },
|
|
30433
|
+
{ label: "Exit", desc: "", args: [] }
|
|
30445
30434
|
] : [
|
|
30446
|
-
{
|
|
30447
|
-
{
|
|
30448
|
-
{
|
|
30449
|
-
{
|
|
30435
|
+
{ label: "Setup", desc: "Connect this device", args: ["init"] },
|
|
30436
|
+
{ label: "Doctor", desc: "Check system health", args: ["doctor"] },
|
|
30437
|
+
{ label: "Help", desc: "Show all commands", args: ["--help"] },
|
|
30438
|
+
{ label: "Exit", desc: "", args: [] }
|
|
30450
30439
|
];
|
|
30440
|
+
for (let i = 0;i < items.length; i++) {
|
|
30441
|
+
const num = source_default.hex("#FFA500")(` ${i + 1})`);
|
|
30442
|
+
const label = source_default.bold(items[i].label);
|
|
30443
|
+
const desc = items[i].desc ? source_default.dim(` \u2014 ${items[i].desc}`) : "";
|
|
30444
|
+
console.log(`${num} ${label}${desc}`);
|
|
30445
|
+
}
|
|
30446
|
+
console.log();
|
|
30451
30447
|
try {
|
|
30452
|
-
const {
|
|
30448
|
+
const { choice } = await dist_default12.prompt([
|
|
30453
30449
|
{
|
|
30454
|
-
type: "
|
|
30455
|
-
name: "
|
|
30456
|
-
message: "
|
|
30457
|
-
|
|
30450
|
+
type: "number",
|
|
30451
|
+
name: "choice",
|
|
30452
|
+
message: "Pick an option:",
|
|
30453
|
+
validate: (v) => {
|
|
30454
|
+
if (v >= 1 && v <= items.length)
|
|
30455
|
+
return true;
|
|
30456
|
+
return `Enter a number between 1 and ${items.length}`;
|
|
30457
|
+
}
|
|
30458
30458
|
}
|
|
30459
30459
|
]);
|
|
30460
|
-
|
|
30460
|
+
const selected = items[choice - 1];
|
|
30461
|
+
if (selected.args.length === 0)
|
|
30461
30462
|
return;
|
|
30462
|
-
|
|
30463
|
-
await program2.parseAsync(["node", "ccsini", ...
|
|
30463
|
+
console.log();
|
|
30464
|
+
await program2.parseAsync(["node", "ccsini", ...selected.args]);
|
|
30464
30465
|
} catch {}
|
|
30465
30466
|
}
|
|
30466
30467
|
|