sheetlink 0.1.6 → 0.1.9

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.6",
3
+ "version": "0.1.9",
4
4
  "description": "CLI for SheetLink — sync your bank transactions to any destination",
5
5
  "type": "module",
6
6
  "bin": {
@@ -93,59 +93,8 @@ async function googleOAuthFlow() {
93
93
  const error = url.searchParams.get('error');
94
94
 
95
95
  res.writeHead(200, { 'Content-Type': 'text/html' });
96
- res.end(`<!DOCTYPE html>
97
- <html lang="en">
98
- <head>
99
- <meta charset="UTF-8">
100
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
101
- <title>SheetLink — Authenticated</title>
102
- <style>
103
- * { box-sizing: border-box; margin: 0; padding: 0; }
104
- body {
105
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
106
- background: #f9fafb;
107
- display: flex;
108
- align-items: center;
109
- justify-content: center;
110
- min-height: 100vh;
111
- color: #111;
112
- }
113
- .card {
114
- background: #fff;
115
- border: 1px solid #e5e7eb;
116
- border-radius: 16px;
117
- padding: 48px 40px;
118
- text-align: center;
119
- max-width: 380px;
120
- width: 90%;
121
- box-shadow: 0 1px 4px rgba(0,0,0,0.06);
122
- }
123
- .icon {
124
- width: 48px;
125
- height: 48px;
126
- background: #d1fae5;
127
- border-radius: 50%;
128
- display: flex;
129
- align-items: center;
130
- justify-content: center;
131
- margin: 0 auto 20px;
132
- }
133
- h1 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
134
- p { font-size: 14px; color: #6b7280; line-height: 1.5; }
135
- </style>
136
- </head>
137
- <body>
138
- <div class="card">
139
- <div class="icon">
140
- <svg width="24" height="24" fill="none" stroke="#059669" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24">
141
- <polyline points="20 6 9 17 4 12"/>
142
- </svg>
143
- </div>
144
- <h1>You're signed in</h1>
145
- <p>Authentication complete. You can close this tab and return to the terminal.</p>
146
- </div>
147
- </body>
148
- </html>`);
96
+ res.end('<!DOCTYPE html><html><head><meta charset="UTF-8"><title>SheetLink</title><script>window.location.replace("https://sheetlink.app/cli/welcome");</script></head><body></body></html>');
97
+ server.closeAllConnections?.();
149
98
  server.close();
150
99
 
151
100
  if (error) return reject(new Error(`OAuth error: ${error}`));
@@ -171,7 +120,7 @@ async function googleOAuthFlow() {
171
120
  });
172
121
 
173
122
  server.on('error', reject);
174
- setTimeout(() => { server.close(); reject(new Error('OAuth timeout (2 minutes)')); }, 120_000);
123
+ setTimeout(() => { server.closeAllConnections?.(); server.close(); reject(new Error('OAuth timeout (2 minutes)')); }, 120_000);
175
124
  });
176
125
  }
177
126