@hawkeye-xb.com/imprint-cli 0.2.4 → 0.2.6
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/cli.js +20 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -103,11 +103,21 @@ var SUCCESS_HTML = `<!doctype html>
|
|
|
103
103
|
border: 1px solid #e5e7eb; text-align: center; }
|
|
104
104
|
h1 { color: #007c8b; margin: 0 0 0.5rem; }
|
|
105
105
|
p { color: #666; margin: 0; }
|
|
106
|
+
.hint { font-size: 0.85rem; color: #999; margin-top: 0.75rem; }
|
|
106
107
|
</style>
|
|
107
|
-
<script>
|
|
108
|
+
<script>
|
|
109
|
+
history.replaceState({}, "", "/");
|
|
110
|
+
// Try to auto-close. Most browsers block window.close() on user-
|
|
111
|
+
// opened tabs, but the call is harmless when it fails and saves
|
|
112
|
+
// a click when it succeeds (Safari, scripted Firefox, etc.).
|
|
113
|
+
setTimeout(() => {
|
|
114
|
+
try { window.close(); } catch (_) {}
|
|
115
|
+
}, 600);
|
|
116
|
+
</script></head>
|
|
108
117
|
<body><div class="card">
|
|
109
118
|
<h1>\u2713 Authorized</h1>
|
|
110
|
-
<p>
|
|
119
|
+
<p>Return to your terminal.</p>
|
|
120
|
+
<p class="hint">This tab should close automatically; if it doesn't, you can close it.</p>
|
|
111
121
|
</div></body></html>`;
|
|
112
122
|
var ERROR_HTML = (msg) => `<!doctype html>
|
|
113
123
|
<html><head><meta charset="utf-8"><title>Imprint \u2014 error</title></head>
|
|
@@ -207,6 +217,7 @@ function waitForCallback(port, expectedState) {
|
|
|
207
217
|
function finish(err, token) {
|
|
208
218
|
clearTimeout(timeout);
|
|
209
219
|
server.close();
|
|
220
|
+
server.closeAllConnections();
|
|
210
221
|
if (err) reject(err);
|
|
211
222
|
else if (token) resolve(token);
|
|
212
223
|
}
|
|
@@ -561,9 +572,13 @@ async function switchAccount(_args) {
|
|
|
561
572
|
}
|
|
562
573
|
console.log(`Will re-install for: ${detected.join(", ")}
|
|
563
574
|
`);
|
|
564
|
-
|
|
565
|
-
console.log(
|
|
566
|
-
|
|
575
|
+
console.log("Log in with the account you want to switch to.");
|
|
576
|
+
console.log(
|
|
577
|
+
'(On the confirmation page, click "Switch Account" if it shows the wrong email.)\n'
|
|
578
|
+
);
|
|
579
|
+
await login();
|
|
580
|
+
const creds = await readCredentials();
|
|
581
|
+
if (!creds) throw new Error("login completed but credentials still missing");
|
|
567
582
|
const apiBase = await resolveApiBase();
|
|
568
583
|
for (const tool of detected) {
|
|
569
584
|
await installToolByName(tool, creds.token, apiBase);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hawkeye-xb.com/imprint-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Imprint CLI — long-term memory for AI coding tools (Claude Code, Cursor, Codex). Installs the imprint MCP server into your tool's settings file via a browser OAuth flow.",
|
|
6
6
|
"license": "Elastic-2.0",
|