sheetlink 0.1.8 → 0.1.10

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.8",
3
+ "version": "0.1.10",
4
4
  "description": "CLI for SheetLink — sync your bank transactions to any destination",
5
5
  "type": "module",
6
6
  "bin": {
@@ -93,62 +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
- <script>history.replaceState(null, '', '/');</script>
139
- <div class="card">
140
- <div class="icon">
141
- <svg width="24" height="24" fill="none" stroke="#059669" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24">
142
- <polyline points="20 6 9 17 4 12"/>
143
- </svg>
144
- </div>
145
- <h1>You're signed in</h1>
146
- <p>Authentication complete. You can close this tab and return to the terminal.</p>
147
- </div>
148
- </body>
149
- </html>`);
150
- server.closeAllConnections?.();
151
- server.close();
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
+ res.on('finish', () => { server.closeAllConnections?.(); server.close(); });
152
98
 
153
99
  if (error) return reject(new Error(`OAuth error: ${error}`));
154
100
  if (returnedState !== state) return reject(new Error('State mismatch — possible CSRF'));