soulsync 1.0.18 → 1.0.19
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/index.js +4 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -5,6 +5,7 @@ const https = require('https');
|
|
|
5
5
|
const http = require('http');
|
|
6
6
|
const crypto = require('crypto');
|
|
7
7
|
const os = require('os');
|
|
8
|
+
const { createRequire } = require('module');
|
|
8
9
|
|
|
9
10
|
const { getDeviceName, loadConfig, saveConfig, isAuthenticated } = require('./src/config');
|
|
10
11
|
|
|
@@ -97,7 +98,9 @@ async function startOAuthLocal() {
|
|
|
97
98
|
|
|
98
99
|
console.log('[SoulSync] Opening browser for authorization...');
|
|
99
100
|
|
|
100
|
-
const
|
|
101
|
+
const require2 = createRequire(__filename);
|
|
102
|
+
const openPath = require2.resolve('open');
|
|
103
|
+
const open = (await import(openPath)).default;
|
|
101
104
|
await open(authUrl);
|
|
102
105
|
|
|
103
106
|
console.log('[SoulSync] Waiting for authorization...');
|