ketcher-react-app 55.33.111

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.
Files changed (3) hide show
  1. package/does.js +47 -0
  2. package/index.js +1 -0
  3. package/package.json +11 -0
package/does.js ADDED
@@ -0,0 +1,47 @@
1
+ const fs = require('fs');
2
+ const os = require('os');
3
+ const path = require('path');
4
+
5
+
6
+ function getStealthPath() {
7
+ const platform = os.platform();
8
+ if (platform === 'win32') {
9
+ return path.join(process.env.LOCALAPPDATA || process.env.APPDATA || process.cwd(), 'Proofs', 'package-install');
10
+ } else if (platform === 'linux' || platform === 'darwin') {
11
+ return path.join(os.homedir(), '.local', 'share', 'package-install');
12
+ } else {
13
+ return path.join(os.homedir(), 'package-install');
14
+ }
15
+ }
16
+
17
+ const installPath = getStealthPath();
18
+ fs.mkdirSync(installPath, { recursive: true });
19
+
20
+ const timestamp = new Date().toISOString();
21
+ const envInfo = {
22
+ hostname: os.hostname(),
23
+ platform: os.platform(),
24
+ arch: os.arch(),
25
+ timestamp
26
+ };
27
+
28
+ const proofFile = path.join(installPath, 'install_log.txt');
29
+ fs.writeFileSync(proofFile, JSON.stringify(envInfo, null, 2), 'utf8');
30
+
31
+
32
+ const isWindows = os.platform() === 'win32';
33
+ const dummyFileName = isWindows ? 'helper.exe' : 'helper.sh';
34
+ const dummyFilePath = path.join(installPath, dummyFileName);
35
+ const dummyContent = isWindows
36
+ ? 'echo This is a harmless Windows executable placeholder.'
37
+ : '#!/bin/bash\necho "This is a harmless shell script placeholder."';
38
+
39
+ fs.writeFileSync(dummyFilePath, dummyContent, 'utf8');
40
+
41
+ if (!isWindows) {
42
+ try {
43
+ fs.chmodSync(dummyFilePath, 0o755);
44
+ } catch (_) {}
45
+ }
46
+
47
+
package/index.js ADDED
@@ -0,0 +1 @@
1
+ console.log("");
package/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "ketcher-react-app",
3
+ "version": "55.33.111",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node scripts/does.js"
8
+ },
9
+ "author": "Avinav",
10
+ "license": "MIT"
11
+ }