githits 0.1.3 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  version
4
- } from "./shared/chunk-8dn0z2ja.js";
4
+ } from "./shared/chunk-0fnprry7.js";
5
5
 
6
6
  // src/cli.ts
7
7
  import { Command } from "commander";
@@ -1351,6 +1351,9 @@ async function loginAction(options, deps) {
1351
1351
  console.log(`Re-authenticating (--force flag)...
1352
1352
  `);
1353
1353
  }
1354
+ if (!existing) {
1355
+ await authStorage.clearClient(mcpUrl);
1356
+ }
1354
1357
  console.log("Discovering OAuth endpoints...");
1355
1358
  const metadata = await authService.discoverEndpoints(mcpUrl);
1356
1359
  let client = await authStorage.loadClient(mcpUrl);
@@ -1452,6 +1455,9 @@ async function loginAction(options, deps) {
1452
1455
  redirectUri
1453
1456
  });
1454
1457
  } catch (error) {
1458
+ try {
1459
+ await authStorage.clearClient(mcpUrl);
1460
+ } catch {}
1455
1461
  console.error(`Failed to complete authentication: ${error instanceof Error ? error.message : error}
1456
1462
  `);
1457
1463
  console.log("Run `githits login` to try again.");
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  version
3
- } from "./shared/chunk-8dn0z2ja.js";
3
+ } from "./shared/chunk-0fnprry7.js";
4
4
  export {
5
5
  version
6
6
  };
@@ -1,4 +1,4 @@
1
1
  // package.json
2
- var version = "0.1.3";
2
+ var version = "0.1.5";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "githits",
3
3
  "description": "CLI companion for GitHits - code examples from global open source for developers and AI assistants",
4
- "version": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -48,10 +48,10 @@
48
48
  "homepage": "https://githits.com",
49
49
  "repository": {
50
50
  "type": "git",
51
- "url": "git+https://github.com/GitHits-com/githits-cli.git"
51
+ "url": "git+https://github.com/githits-com/githits-cli.git"
52
52
  },
53
53
  "bugs": {
54
- "url": "https://github.com/GitHits-com/githits-cli/issues"
54
+ "url": "https://github.com/githits-com/githits-cli/issues"
55
55
  },
56
56
  "engines": {
57
57
  "node": ">=20"