fop-cli 3.9.2 → 3.9.3
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/bin/fop.js +34 -0
- package/install.js +1 -1
- package/package.json +3 -3
package/bin/fop.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
|
|
7
|
+
const binaryPath = path.join(__dirname, 'fop-binary');
|
|
8
|
+
|
|
9
|
+
// Check if binary exists
|
|
10
|
+
if (!fs.existsSync(binaryPath)) {
|
|
11
|
+
console.error('Error: FOP binary not found.');
|
|
12
|
+
console.error('');
|
|
13
|
+
console.error('The binary may not have been downloaded during installation.');
|
|
14
|
+
console.error('Try reinstalling: npm install -g fop-cli');
|
|
15
|
+
console.error('');
|
|
16
|
+
console.error('Or run the install script manually:');
|
|
17
|
+
console.error(` node ${path.join(__dirname, '..', 'install.js')}`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Spawn the binary with all arguments
|
|
22
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
23
|
+
stdio: 'inherit',
|
|
24
|
+
env: process.env
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
child.on('error', (err) => {
|
|
28
|
+
console.error('Failed to start FOP:', err.message);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
child.on('close', (code) => {
|
|
33
|
+
process.exit(code || 0);
|
|
34
|
+
});
|
package/install.js
CHANGED
|
@@ -7,7 +7,7 @@ const path = require('path');
|
|
|
7
7
|
const { execSync } = require('child_process');
|
|
8
8
|
|
|
9
9
|
// Configuration - UPDATE THESE FOR YOUR RELEASE
|
|
10
|
-
const VERSION = '3.9.
|
|
10
|
+
const VERSION = '3.9.3';
|
|
11
11
|
const GITHUB_REPO = 'ryanbr/fop-rs'; // Change to your repo
|
|
12
12
|
const BINARY_NAME = 'fop';
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fop-cli",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.3",
|
|
4
4
|
"description": "Filter Orderer and Preener - A tool for sorting and cleaning ad-blocking filter lists",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"adblock",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"url": "https://github.com/ryanbr/fop-rs/issues"
|
|
22
22
|
},
|
|
23
23
|
"bin": {
|
|
24
|
-
"fop": "bin/fop"
|
|
24
|
+
"fop": "bin/fop.js"
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
27
|
-
"bin/fop",
|
|
27
|
+
"bin/fop.js",
|
|
28
28
|
"install.js",
|
|
29
29
|
"README.md"
|
|
30
30
|
],
|