shiva-code 0.7.7 → 0.7.10
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/{chunk-RQ75X32M.js → chunk-4OT4OY7L.js} +175 -25
- package/dist/chunk-GGNOX6DN.js +195 -0
- package/dist/{chunk-KW3LP3K3.js → chunk-IWDZCN4S.js} +61 -35
- package/dist/{chunk-J5IS642F.js → chunk-KB6M24M3.js} +10 -0
- package/dist/chunk-UABU5VVI.js +246 -0
- package/dist/{client-RPSJP4Z5.js → client-H3JXPT5B.js} +1 -1
- package/dist/{hook-GIK5RFRC.js → hook-CCATCFG7.js} +2 -2
- package/dist/index.js +454 -247
- package/dist/{logger-E7SC5KUO.js → logger-VVWOD6AA.js} +5 -3
- package/dist/{login-Y6EJABSP.js → login-DBN2L25M.js} +3 -3
- package/dist/token-detection-K6KCIWAU.js +19 -0
- package/package.json +1 -1
- package/dist/chunk-Z6NXFC4Q.js +0 -118
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loginCommand
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-IWDZCN4S.js";
|
|
4
|
+
import "./chunk-UABU5VVI.js";
|
|
5
|
+
import "./chunk-KB6M24M3.js";
|
|
6
6
|
import "./chunk-OP4HYQZZ.js";
|
|
7
7
|
import "./chunk-3RG5ZIWI.js";
|
|
8
8
|
export {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TOKEN_PATTERNS,
|
|
3
|
+
containsTokens,
|
|
4
|
+
detectTokens,
|
|
5
|
+
getPatternByName,
|
|
6
|
+
getSupportedServices,
|
|
7
|
+
maskToken,
|
|
8
|
+
redactTokens
|
|
9
|
+
} from "./chunk-GGNOX6DN.js";
|
|
10
|
+
import "./chunk-3RG5ZIWI.js";
|
|
11
|
+
export {
|
|
12
|
+
TOKEN_PATTERNS,
|
|
13
|
+
containsTokens,
|
|
14
|
+
detectTokens,
|
|
15
|
+
getPatternByName,
|
|
16
|
+
getSupportedServices,
|
|
17
|
+
maskToken,
|
|
18
|
+
redactTokens
|
|
19
|
+
};
|
package/package.json
CHANGED
package/dist/chunk-Z6NXFC4Q.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
// src/utils/logger.ts
|
|
2
|
-
import chalk from "chalk";
|
|
3
|
-
var log = {
|
|
4
|
-
// Success messages
|
|
5
|
-
success: (message) => console.log(chalk.green("\u2713"), message),
|
|
6
|
-
// Error messages
|
|
7
|
-
error: (message) => console.log(chalk.red("\u2717"), message),
|
|
8
|
-
// Warning messages
|
|
9
|
-
warn: (message) => console.log(chalk.yellow("\u26A0"), message),
|
|
10
|
-
// Info messages
|
|
11
|
-
info: (message) => console.log(chalk.blue("\u2139"), message),
|
|
12
|
-
// Plain message
|
|
13
|
-
plain: (message) => console.log(message),
|
|
14
|
-
// Dimmed text
|
|
15
|
-
dim: (message) => console.log(chalk.dim(message)),
|
|
16
|
-
// Bold text
|
|
17
|
-
bold: (message) => console.log(chalk.bold(message)),
|
|
18
|
-
// Newline
|
|
19
|
-
newline: () => console.log(),
|
|
20
|
-
// Header
|
|
21
|
-
header: (title) => {
|
|
22
|
-
console.log();
|
|
23
|
-
console.log(chalk.bold(title));
|
|
24
|
-
console.log(chalk.dim("\u2500".repeat(title.length)));
|
|
25
|
-
},
|
|
26
|
-
// Key-value pair
|
|
27
|
-
keyValue: (key, value, indent = 0) => {
|
|
28
|
-
const spaces = " ".repeat(indent);
|
|
29
|
-
console.log(`${spaces}${chalk.dim(key + ":")} ${value}`);
|
|
30
|
-
},
|
|
31
|
-
// List item
|
|
32
|
-
listItem: (text, status) => {
|
|
33
|
-
let icon = "\u2022";
|
|
34
|
-
if (status === "synced") icon = chalk.green("\u2713");
|
|
35
|
-
if (status === "pending") icon = chalk.yellow("\u25CB");
|
|
36
|
-
if (status === "error") icon = chalk.red("\u2717");
|
|
37
|
-
console.log(` ${icon} ${text}`);
|
|
38
|
-
},
|
|
39
|
-
// Tree structure
|
|
40
|
-
tree: {
|
|
41
|
-
item: (text, isLast = false) => {
|
|
42
|
-
const prefix = isLast ? "\u2514\u2500" : "\u251C\u2500";
|
|
43
|
-
console.log(chalk.dim(prefix), text);
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
// Branded header
|
|
47
|
-
brand: () => {
|
|
48
|
-
console.log();
|
|
49
|
-
console.log(chalk.hex("#FF6B2C").bold("SHIVA Code"));
|
|
50
|
-
console.log(chalk.dim("Makes Claude Code Persistent"));
|
|
51
|
-
console.log();
|
|
52
|
-
},
|
|
53
|
-
// Error with suggestion (for ShivaError)
|
|
54
|
-
errorWithSuggestion: (error) => {
|
|
55
|
-
console.log(chalk.red("\u2717"), error.message);
|
|
56
|
-
if (error.suggestion) {
|
|
57
|
-
console.log(chalk.dim(` \u2192 ${error.suggestion}`));
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
// Progress bar
|
|
61
|
-
progress: (current, total, label) => {
|
|
62
|
-
const percentage = Math.round(current / total * 100);
|
|
63
|
-
const barWidth = 20;
|
|
64
|
-
const filled = Math.round(current / total * barWidth);
|
|
65
|
-
const empty = barWidth - filled;
|
|
66
|
-
const bar = chalk.green("\u2588".repeat(filled)) + chalk.dim("\u2591".repeat(empty));
|
|
67
|
-
const counts = chalk.dim(`${current}/${total}`);
|
|
68
|
-
const labelStr = label ? ` ${label}` : "";
|
|
69
|
-
process.stdout.write(`\r[${bar}] ${counts}${labelStr}`);
|
|
70
|
-
if (current >= total) {
|
|
71
|
-
console.log();
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
// Status line (inline update)
|
|
75
|
-
status: (message) => {
|
|
76
|
-
process.stdout.write(`\r${chalk.dim("\u2192")} ${message}`.padEnd(60));
|
|
77
|
-
},
|
|
78
|
-
// Clear the current line
|
|
79
|
-
clearLine: () => {
|
|
80
|
-
process.stdout.write("\r" + " ".repeat(80) + "\r");
|
|
81
|
-
},
|
|
82
|
-
// Box with title
|
|
83
|
-
box: (title, content) => {
|
|
84
|
-
const maxLen = Math.max(title.length, ...content.map((l) => l.length));
|
|
85
|
-
const border = "\u2500".repeat(maxLen + 2);
|
|
86
|
-
console.log(chalk.dim(`\u250C${border}\u2510`));
|
|
87
|
-
console.log(chalk.dim("\u2502 ") + chalk.bold(title.padEnd(maxLen)) + chalk.dim(" \u2502"));
|
|
88
|
-
console.log(chalk.dim(`\u251C${border}\u2524`));
|
|
89
|
-
for (const line of content) {
|
|
90
|
-
console.log(chalk.dim("\u2502 ") + line.padEnd(maxLen) + chalk.dim(" \u2502"));
|
|
91
|
-
}
|
|
92
|
-
console.log(chalk.dim(`\u2514${border}\u2518`));
|
|
93
|
-
},
|
|
94
|
-
// Table row
|
|
95
|
-
tableRow: (columns, widths) => {
|
|
96
|
-
const padded = columns.map((col, i) => col.padEnd(widths[i] || col.length));
|
|
97
|
-
console.log(" " + padded.join(" "));
|
|
98
|
-
},
|
|
99
|
-
// Separator line
|
|
100
|
-
separator: (char = "\u2500", length = 40) => {
|
|
101
|
-
console.log(chalk.dim(char.repeat(length)));
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
var colors = {
|
|
105
|
-
orange: chalk.hex("#FF6B2C"),
|
|
106
|
-
cyan: chalk.hex("#00D4FF"),
|
|
107
|
-
green: chalk.green,
|
|
108
|
-
red: chalk.red,
|
|
109
|
-
yellow: chalk.yellow,
|
|
110
|
-
blue: chalk.blue,
|
|
111
|
-
dim: chalk.dim,
|
|
112
|
-
bold: chalk.bold
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export {
|
|
116
|
-
log,
|
|
117
|
-
colors
|
|
118
|
-
};
|