claudeline 1.3.0 → 1.3.1
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 +11 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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.1
|
|
1508
|
+
var VERSION = "1.3.1";
|
|
1500
1509
|
async function readStdin() {
|
|
1501
1510
|
return new Promise((resolve, reject) => {
|
|
1502
1511
|
let input = "";
|