rnapp-release
v0.1.4
Published
Local RN app release workbench for uploading, publishing, and downloading RN packages.
Downloads
367
Maintainers
Readme
rnapp-release
Local "应用管理" demo for uploading, viewing, publishing, and downloading app packages.
Run From npm
npx rnapp-releaseOr install globally:
npm install -g rnapp-release
rnapp-releaseRun From Source
npm install
npm run build
npm run startThe service starts on port 3000 by default. Override it with:
rnapp-release --port 3100
PORT=3100 rnapp-releaseRuntime data is stored in ./app-manager-demo-data under the directory where the command is run.
On startup the service prints a default super admin account and password. The
first startup generates the password and stores it in
app-manager-demo-data/super-admin.secret.json; later startups reuse and print
the same credentials. Use this account to sign in and create managed accounts
from the user management page. Roles are:
- Super admin: manage users, add/edit/delete apps, publish versions, and delete versions.
- Admin: add/edit apps, publish versions, and delete versions.
- Normal user: publish versions only.
Demo Workflow
- Start the service.
- Open the printed local URL.
- Click "新增应用".
- Enter application metadata and optional normal/focus icons.
- Publish a built RN
.zippackage. - Download the published release package.
Runtime files are created in app-manager-demo-data/.
Created apps keep the original management parameters in API responses: appType
defaults to rn-tv, appId defaults to 0, and app icons are returned as
normalIcon and focusIcon.
The server writes runtime logs to stdout/stderr. Every request is logged with method, path, status, duration, and client IP. Release publishing and RN-CORE parsing also log success and failure details to help diagnose upload issues. Startup logs print localhost plus detected network interface URLs with the configured port.
RN Release Package
The uploaded .zip should contain the React Native build output, not the RN
project source code. A typical package contains index.android.bundle and the
asset files copied by react-native bundle.
The service finds index.android.bundle anywhere inside the zip and tries to
read the RN-CORE dependency version from ipanel-rntv-core, rntv-core, or a
coreVersion marker. The publish form fills this value automatically after you
choose the package. If parsing fails, the form shows the failure reason and then
lets you enter coreVersion manually.
Java-compatible RN Update API
RN clients can call the Java-compatible update endpoint:
curl "http://localhost:3000/s/jshomeapp/tv/getRnAppInfo?appEnglishName=tv_sports&coreVersion=v1.0.138"Clients that list already released RN apps for an operator can use the
Java-compatible REST endpoint. The operator UUID is accepted as a path segment;
local demo releases that use the default all operator are returned for any
operator UUID:
curl "http://localhost:3000/s/jshomeapp/tv-operator/operator-uuid/released-rn-apps?platform=android"
curl "http://localhost:3000/jshomeapp/tv-operator/operator-uuid/released-rn-apps?platform=android"Successful responses use code: 0, msg: "操作成功", and return either one
matching release object or data: null. Business validation errors use
code: 500002.
Published releases generate versionCode values as v1.0.0, v1.0.1, and so
on. The update API returns Java-compatible fields such as versionCode,
coreVersion, upgradeMode, fileMd5, packZipUrl, normalIcon, and
focusIcon. packZipUrl is an absolute URL under
/jshomeapp/appFiles/packFiles/...zip.
The management UI treats upgrades as automatic; upgradeMode is kept as a
Java-compatible protocol field and defaults to 0.
