githits 0.1.2 → 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-2wbvwsc9.js";
4
+ } from "./shared/chunk-0fnprry7.js";
5
5
 
6
6
  // src/cli.ts
7
7
  import { Command } from "commander";
@@ -1189,6 +1189,8 @@ function requireAuth(deps, context) {
1189
1189
  console.log(` githits login
1190
1190
  `);
1191
1191
  console.log("Or set GITHITS_API_TOKEN environment variable.");
1192
+ console.log(`
1193
+ Need help? support@githits.com`);
1192
1194
  throw new AuthRequiredError(`Authentication required${suffix}`);
1193
1195
  }
1194
1196
 
@@ -1349,6 +1351,9 @@ async function loginAction(options, deps) {
1349
1351
  console.log(`Re-authenticating (--force flag)...
1350
1352
  `);
1351
1353
  }
1354
+ if (!existing) {
1355
+ await authStorage.clearClient(mcpUrl);
1356
+ }
1352
1357
  console.log("Discovering OAuth endpoints...");
1353
1358
  const metadata = await authService.discoverEndpoints(mcpUrl);
1354
1359
  let client = await authStorage.loadClient(mcpUrl);
@@ -1450,6 +1455,9 @@ async function loginAction(options, deps) {
1450
1455
  redirectUri
1451
1456
  });
1452
1457
  } catch (error) {
1458
+ try {
1459
+ await authStorage.clearClient(mcpUrl);
1460
+ } catch {}
1453
1461
  console.error(`Failed to complete authentication: ${error instanceof Error ? error.message : error}
1454
1462
  `);
1455
1463
  console.log("Run `githits login` to try again.");
@@ -1807,7 +1815,9 @@ Getting started:
1807
1815
  githits mcp Start MCP server for your AI assistant
1808
1816
  githits search "query" --lang python Search for code examples
1809
1817
 
1810
- Learn more at https://githits.com`);
1818
+ Learn more at https://githits.com
1819
+ Docs: https://app.githits.com/docs/
1820
+ Support: support@githits.com`);
1811
1821
  registerLoginCommand(program);
1812
1822
  registerLogoutCommand(program);
1813
1823
  registerMcpCommand(program);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  version
3
- } from "./shared/chunk-2wbvwsc9.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.2";
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.2",
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"