claudeline 1.3.0 → 1.4.0
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 +12 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -477,7 +477,7 @@ var THEMES = {
|
|
|
477
477
|
nerd: "emoji:node env:node-short sep:dot emoji:folder fs:dir sep:dot emoji:branch git:branch git:status",
|
|
478
478
|
compact: "claude:model sep:slash fs:dir sep:slash git:branch",
|
|
479
479
|
colorful: "bold:magenta:claude:model sep:arrow cyan:fs:dir sep:arrow green:git:branch yellow:git:status sep:arrow blue:ctx:percent",
|
|
480
|
-
luca: "bold:magenta:claude:model-letter sep:pipe cyan:nerd:repo cyan:git:repo sep:none
|
|
480
|
+
luca: "bold:magenta:claude:model-letter sep:pipe cyan:nerd:repo cyan:git:repo sep:none text:: sep:none green:git:branch if:subdir(sep:none white:text:/ sep:none white:fs:relative) if:dirty(sep:pipe git:dirty) sep:pipe white:account:email sep:newline bold:white:usage:5h-bar:8 usage:5h usage:5h-reset sep:pipe bold:white:usage:week-bar:8 usage:week usage:week-reset sep:pipe white:cost:total"
|
|
481
481
|
};
|
|
482
482
|
function getTheme(name) {
|
|
483
483
|
return THEMES[name] || null;
|
|
@@ -767,10 +767,19 @@ function writeCache(cacheFile, data) {
|
|
|
767
767
|
} catch {
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
|
+
function getKeychainService() {
|
|
771
|
+
const configDir = process.env.CLAUDE_CONFIG_DIR;
|
|
772
|
+
if (configDir) {
|
|
773
|
+
const suffix = crypto.createHash("sha256").update(configDir).digest("hex").slice(0, 8);
|
|
774
|
+
return `Claude Code-credentials-${suffix}`;
|
|
775
|
+
}
|
|
776
|
+
return "Claude Code-credentials";
|
|
777
|
+
}
|
|
770
778
|
function getOAuthToken() {
|
|
771
779
|
try {
|
|
780
|
+
const service = getKeychainService();
|
|
772
781
|
const raw = execSync(
|
|
773
|
-
|
|
782
|
+
`security find-generic-password -s "${service}" -w 2>/dev/null`,
|
|
774
783
|
{ encoding: "utf8" }
|
|
775
784
|
).trim();
|
|
776
785
|
const parsed = JSON.parse(raw);
|
|
@@ -1496,7 +1505,7 @@ function evaluateFormat(format, data, options = {}) {
|
|
|
1496
1505
|
}
|
|
1497
1506
|
|
|
1498
1507
|
// src/index.ts
|
|
1499
|
-
var VERSION = "1.
|
|
1508
|
+
var VERSION = "1.4.0";
|
|
1500
1509
|
async function readStdin() {
|
|
1501
1510
|
return new Promise((resolve, reject) => {
|
|
1502
1511
|
let input = "";
|