@min-pack/ss-rust 0.0.6 → 0.0.7

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.sh ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+
3
+ OS="$(uname -s)"
4
+ ARCH="$(uname -m)"
5
+ DIR="$(cd "$(dirname "$0")" && pwd)"
6
+
7
+ if [[ "$OS" == "Linux" && "$ARCH" == "x86_64" ]]; then exec "$DIR/ssservice-linux-x86_64" "$@"
8
+ elif [[ "$OS" == "Linux" && "$ARCH" == "aarch64" ]]; then exec "$DIR/ssservice-linux-aarch64" "$@"
9
+ else echo "no binary for $OS-$ARCH" >&2; exit 1
10
+ fi
package/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@min-pack/ss-rust",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Latest 'ssservice' binaries (musl) from 'shadowsocks-rust'",
5
5
  "bin": {
6
- "ss-rust": "bin.js",
7
- "ssservice": "bin.js",
8
- "SSRS": "bin.js"
6
+ "ss-rust": "bin.sh",
7
+ "ssservice": "bin.sh",
8
+ "SSRS": "bin.sh"
9
9
  },
10
+ "os": [
11
+ "linux"
12
+ ],
13
+ "cpu": [
14
+ "x64",
15
+ "arm64"
16
+ ],
10
17
  "config": {
11
18
  "RELEASE_NAME": "v1.24.0"
12
19
  }
package/bin.js DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const RUNTIME = `${process.platform}-${process.arch}`
4
- if (![ 'linux-x64', 'linux-arm64' ].includes(RUNTIME)) {
5
- console.error(`bad RUNTIME: ${RUNTIME}`)
6
- process.exit(-1)
7
- }
8
-
9
- const { resolve } = require('node:path')
10
- const { spawnSync } = require('node:child_process')
11
- const [
12
- , // node
13
- , // script
14
- ...extraArgs
15
- ] = process.argv
16
- spawnSync(resolve(__dirname, `ssservice-${RUNTIME}`), extraArgs, { stdio: 'inherit' })
File without changes