localhostforonline 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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/install.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
|
|
5
|
+
const platform = os.platform();
|
|
6
|
+
const arch = os.arch();
|
|
7
|
+
|
|
8
|
+
const platformMap = {
|
|
9
|
+
linux: 'linux',
|
|
10
|
+
darwin: 'darwin',
|
|
11
|
+
win32: 'win32',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const archMap = {
|
|
15
|
+
x64: 'amd64',
|
|
16
|
+
arm64: 'arm64',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const plat = platformMap[platform];
|
|
20
|
+
const archName = archMap[arch];
|
|
21
|
+
|
|
22
|
+
if (!plat || !archName) {
|
|
23
|
+
console.error(`Unsupported platform: ${platform} ${arch}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const binDir = path.join(__dirname, 'bin');
|
|
28
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
29
|
+
|
|
30
|
+
const ext = plat === 'win32' ? '.exe' : '';
|
|
31
|
+
const srcName = `lf-${plat}-${archName}${ext}`;
|
|
32
|
+
const srcPath = path.join(__dirname, 'binaries', srcName);
|
|
33
|
+
const destName = plat === 'win32' ? 'lf.exe' : 'lf';
|
|
34
|
+
const destPath = path.join(binDir, destName);
|
|
35
|
+
|
|
36
|
+
if (!fs.existsSync(srcPath)) {
|
|
37
|
+
console.error(`Binary not found: ${srcName}`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
fs.copyFileSync(srcPath, destPath);
|
|
42
|
+
fs.chmodSync(destPath, 0o755);
|
|
43
|
+
console.log(`Installed ${srcName} to ${destPath}`);
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "localhostforonline",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Expose your localhost to the internet",
|
|
5
|
+
"bin": {
|
|
6
|
+
"localhostforonline": "./bin/lf"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node install.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"install.js",
|
|
13
|
+
"binaries/",
|
|
14
|
+
"package.json"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/oismaelash/localhostfor.online"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"tunnel",
|
|
23
|
+
"localhost",
|
|
24
|
+
"ngrok",
|
|
25
|
+
"proxy",
|
|
26
|
+
"development"
|
|
27
|
+
]
|
|
28
|
+
}
|