@qpfai/pf-gate-cli 2.0.1-linux-x64 → 2.0.1-win32-arm64

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 CHANGED
@@ -1,4 +1,4 @@
1
- # @qpfai/pf-gate-cli (linux-x64)
1
+ # @qpfai/pf-gate-cli (win32-arm64)
2
2
 
3
3
  Platform runtime payload for PF Gate CLI.
4
4
 
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@qpfai/pf-gate-cli",
3
- "version": "2.0.1-linux-x64",
4
- "description": "PF Gate runtime payload for linux x64.",
3
+ "version": "2.0.1-win32-arm64",
4
+ "description": "PF Gate runtime payload for win32 arm64.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "os": [
8
- "linux"
8
+ "win32"
9
9
  ],
10
10
  "cpu": [
11
- "x64"
11
+ "arm64"
12
12
  ],
13
13
  "files": [
14
14
  "vendor",
@@ -0,0 +1,50 @@
1
+ @echo off
2
+ setlocal
3
+
4
+ set "SCRIPT_DIR=%~dp0"
5
+ set "BUNDLED_WHEEL=%SCRIPT_DIR%..\python\persons_field-1.0.0-py3-none-any.whl"
6
+
7
+ set "PYTHON_BIN=%PF_GATE_PYTHON%"
8
+ if "%PYTHON_BIN%"=="" (
9
+ where python >nul 2>nul
10
+ if not errorlevel 1 (
11
+ set "PYTHON_BIN=python"
12
+ ) else (
13
+ where py >nul 2>nul
14
+ if not errorlevel 1 (
15
+ set "PYTHON_BIN=py -3"
16
+ ) else (
17
+ echo PF Gate runtime error: Python 3.13+ not found. Install Python or set PF_GATE_PYTHON. 1>&2
18
+ exit /b 1
19
+ )
20
+ )
21
+ )
22
+
23
+ set "PIP_TARGET=%PF_GATE_PIP_SPEC%"
24
+ if "%PIP_TARGET%"=="" set "PIP_TARGET=%BUNDLED_WHEEL%"
25
+ if "%PF_GATE_PIP_SPEC%"=="" (
26
+ if not exist "%BUNDLED_WHEEL%" (
27
+ echo PF Gate runtime error: missing bundled wheel at %BUNDLED_WHEEL% 1>&2
28
+ exit /b 1
29
+ )
30
+ )
31
+
32
+ call %PYTHON_BIN% -c "import persons_field.terminal.launcher" >nul 2>nul
33
+ if errorlevel 1 (
34
+ echo PF Gate runtime: persons_field is missing; installing %PIP_TARGET%... 1>&2
35
+ call %PYTHON_BIN% -m pip --version >nul 2>nul
36
+ if errorlevel 1 (
37
+ call %PYTHON_BIN% -m ensurepip --upgrade >nul 2>nul
38
+ )
39
+ call %PYTHON_BIN% -m pip install --upgrade --disable-pip-version-check "%PIP_TARGET%"
40
+ if errorlevel 1 (
41
+ call %PYTHON_BIN% -m pip install --user --upgrade --disable-pip-version-check "%PIP_TARGET%"
42
+ if errorlevel 1 (
43
+ echo PF Gate runtime error: failed to install %PIP_TARGET%. Set PF_GATE_PYTHON and PF_GATE_PIP_SPEC, then retry. 1>&2
44
+ exit /b 1
45
+ )
46
+ )
47
+ )
48
+
49
+ call %PYTHON_BIN% -m persons_field.terminal.launcher %*
50
+ exit /b %ERRORLEVEL%
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env sh
2
- set -eu
3
-
4
- SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
5
- BUNDLED_WHEEL="$SCRIPT_DIR/../python/persons_field-1.0.0-py3-none-any.whl"
6
-
7
- PYTHON_BIN="${PF_GATE_PYTHON:-}"
8
- if [ -z "$PYTHON_BIN" ]; then
9
- if command -v python3 >/dev/null 2>&1; then
10
- PYTHON_BIN="python3"
11
- elif command -v python >/dev/null 2>&1; then
12
- PYTHON_BIN="python"
13
- else
14
- echo "PF Gate runtime error: Python 3.13+ not found. Install Python or set PF_GATE_PYTHON." >&2
15
- exit 1
16
- fi
17
- fi
18
-
19
- PIP_TARGET="${PF_GATE_PIP_SPEC:-$BUNDLED_WHEEL}"
20
- if [ -z "${PF_GATE_PIP_SPEC:-}" ] && [ ! -f "$BUNDLED_WHEEL" ]; then
21
- echo "PF Gate runtime error: missing bundled wheel at $BUNDLED_WHEEL" >&2
22
- exit 1
23
- fi
24
-
25
- if ! "$PYTHON_BIN" -c "import persons_field.terminal.launcher" >/dev/null 2>&1; then
26
- echo "PF Gate runtime: persons_field is missing; installing ${PIP_TARGET}..." >&2
27
- if ! "$PYTHON_BIN" -m pip --version >/dev/null 2>&1; then
28
- "$PYTHON_BIN" -m ensurepip --upgrade >/dev/null 2>&1 || true
29
- fi
30
- if ! "$PYTHON_BIN" -m pip install --upgrade --disable-pip-version-check "$PIP_TARGET"; then
31
- if ! "$PYTHON_BIN" -m pip install --user --upgrade --disable-pip-version-check "$PIP_TARGET"; then
32
- echo "PF Gate runtime error: failed to install ${PIP_TARGET}. Set PF_GATE_PYTHON and PF_GATE_PIP_SPEC, then retry." >&2
33
- exit 1
34
- fi
35
- fi
36
- fi
37
-
38
- exec "$PYTHON_BIN" -m persons_field.terminal.launcher "$@"