sheetlink 0.1.4 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sheetlink",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "CLI for SheetLink — sync your bank transactions to any destination",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@ import { getTierStatus, listItems } from '../api.js';
21
21
  const GOOGLE_CLIENT_ID = '967710910027-j88nejbs5rnjb5b4801er8sffkv4crdb.apps.googleusercontent.com';
22
22
  const GOOGLE_CLIENT_SECRET = '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';
23
23
  const REDIRECT_PORT = 9876;
24
- const REDIRECT_URI = `http://localhost:${REDIRECT_PORT}/callback`;
24
+ const REDIRECT_URI = `http://localhost:${REDIRECT_PORT}`;
25
25
 
26
26
  export async function cmdAuth(options) {
27
27
  // --- API key path ---
@@ -87,7 +87,7 @@ async function googleOAuthFlow() {
87
87
  const server = http.createServer((req, res) => {
88
88
  const url = new URL(req.url, `http://localhost:${REDIRECT_PORT}`);
89
89
 
90
- if (url.pathname === '/callback') {
90
+ if (url.pathname === '/' || url.pathname === '/callback') {
91
91
  const code = url.searchParams.get('code');
92
92
  const returnedState = url.searchParams.get('state');
93
93
  const error = url.searchParams.get('error');