sheetlink 0.1.10 → 0.1.12
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 +3 -1
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() {
|
|
@@ -119,7 +120,8 @@ async function googleOAuthFlow() {
|
|
|
119
120
|
});
|
|
120
121
|
|
|
121
122
|
server.on('error', reject);
|
|
122
|
-
setTimeout(() => { server.closeAllConnections?.(); server.close(); reject(new Error('OAuth timeout (2 minutes)')); }, 120_000);
|
|
123
|
+
const timeout = setTimeout(() => { server.closeAllConnections?.(); server.close(); reject(new Error('OAuth timeout (2 minutes)')); }, 120_000);
|
|
124
|
+
server.on('close', () => clearTimeout(timeout));
|
|
123
125
|
});
|
|
124
126
|
}
|
|
125
127
|
|