sheetlink 0.1.9 → 0.1.11
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 +1 -1
- package/src/commands/auth.js +2 -2
package/package.json
CHANGED
package/src/commands/auth.js
CHANGED
|
@@ -65,6 +65,7 @@ export async function cmdAuth(options) {
|
|
|
65
65
|
console.log('Authenticated. JWT saved to ~/.sheetlink/config.json');
|
|
66
66
|
console.log('Note: JWT expires in ~1 hour. Re-run `sheetlink auth` when needed.');
|
|
67
67
|
console.log('For unattended automation, upgrade to MAX and use `sheetlink auth --api-key sl_...`');
|
|
68
|
+
process.exit(0);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
async function googleOAuthFlow() {
|
|
@@ -94,8 +95,7 @@ async function googleOAuthFlow() {
|
|
|
94
95
|
|
|
95
96
|
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
96
97
|
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?.();
|
|
98
|
-
server.close();
|
|
98
|
+
res.on('finish', () => { server.closeAllConnections?.(); server.close(); });
|
|
99
99
|
|
|
100
100
|
if (error) return reject(new Error(`OAuth error: ${error}`));
|
|
101
101
|
if (returnedState !== state) return reject(new Error('State mismatch — possible CSRF'));
|