sealtun 0.0.13

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/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # sealtun
2
+
3
+ This package installs the Sealtun CLI by selecting one of the optional platform-specific binary packages for the current operating system and CPU architecture.
package/bin/sealtun.js ADDED
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { spawnSync } = require('node:child_process');
5
+
6
+ const variants = {
7
+ "darwin x64": {
8
+ "packageName": "@gitlayzer/sealtun-darwin-x64",
9
+ "binary": "sealtun"
10
+ },
11
+ "darwin arm64": {
12
+ "packageName": "@gitlayzer/sealtun-darwin-arm64",
13
+ "binary": "sealtun"
14
+ },
15
+ "linux x64": {
16
+ "packageName": "@gitlayzer/sealtun-linux-x64",
17
+ "binary": "sealtun"
18
+ },
19
+ "linux arm64": {
20
+ "packageName": "@gitlayzer/sealtun-linux-arm64",
21
+ "binary": "sealtun"
22
+ },
23
+ "win32 x64": {
24
+ "packageName": "@gitlayzer/sealtun-win32-x64",
25
+ "binary": "sealtun.exe"
26
+ },
27
+ "win32 arm64": {
28
+ "packageName": "@gitlayzer/sealtun-win32-arm64",
29
+ "binary": "sealtun.exe"
30
+ }
31
+ };
32
+ const variant = variants[`${process.platform} ${process.arch}`];
33
+
34
+ if (!variant) {
35
+ console.error(`sealtun does not provide a prebuilt binary for ${process.platform}/${process.arch}.`);
36
+ process.exit(1);
37
+ }
38
+
39
+ let binaryPath;
40
+ try {
41
+ binaryPath = require.resolve(`${variant.packageName}/bin/${variant.binary}`);
42
+ } catch (error) {
43
+ console.error(`Could not find ${variant.packageName}. Reinstall sealtun with optional dependencies enabled.`);
44
+ process.exit(1);
45
+ }
46
+
47
+ const result = spawnSync(binaryPath, process.argv.slice(2), {
48
+ stdio: 'inherit',
49
+ windowsHide: false
50
+ });
51
+
52
+ if (result.error) {
53
+ console.error(result.error.message);
54
+ process.exit(1);
55
+ }
56
+
57
+ if (result.signal) {
58
+ process.kill(process.pid, result.signal);
59
+ } else {
60
+ process.exit(result.status ?? 1);
61
+ }
package/package.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "sealtun",
3
+ "version": "0.0.13",
4
+ "description": "Sealtun 是一款功能强大、设计优雅的 CLI 工具,旨在为 Sealos Cloud 和 Kubernetes 用户提供类似 cloudflared 的内网穿透体验。",
5
+ "keywords": [
6
+ "sealtun",
7
+ "tunnel",
8
+ "sealos"
9
+ ],
10
+ "homepage": "https://github.com/gitlayzer/sealtun#readme",
11
+ "bugs": {
12
+ "url": "https://github.com/gitlayzer/sealtun/issues"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/gitlayzer/sealtun.git"
17
+ },
18
+ "license": "MIT",
19
+ "author": "gitlayzer",
20
+ "type": "commonjs",
21
+ "bin": {
22
+ "sealtun": "bin/sealtun.js"
23
+ },
24
+ "files": [
25
+ "bin"
26
+ ],
27
+ "optionalDependencies": {
28
+ "@gitlayzer/sealtun-darwin-x64": "0.0.13",
29
+ "@gitlayzer/sealtun-darwin-arm64": "0.0.13",
30
+ "@gitlayzer/sealtun-linux-x64": "0.0.13",
31
+ "@gitlayzer/sealtun-linux-arm64": "0.0.13",
32
+ "@gitlayzer/sealtun-win32-x64": "0.0.13",
33
+ "@gitlayzer/sealtun-win32-arm64": "0.0.13"
34
+ }
35
+ }