@qpfai/pf-gate-cli 2.0.0-linux-x64 → 2.0.0-win32-x64

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