Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
pull_request:
push:
branches:
- main

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
verify:
name: lint-build-ui
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Lint workflows
uses: raven-actions/actionlint@v2
with:
version: 1.7.12
pyflakes: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: package-lock.json
Comment on lines +34 to +39

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 2 '"packageManager": "npm@|node-version:|corepack|npm install --global|npm --version' \
  package.json .github/workflows/ci.yml

Repository: OpenCloudGaming/OpenStroid

Length of output: 673


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- workflow ---'
cat -n .github/workflows/ci.yml

printf '%s\n' '--- package metadata and lockfile version ---'
cat -n package.json | sed -n '1,80p'
head -n 12 package-lock.json

printf '%s\n' '--- npm-related repository configuration ---'
rg -n -S 'packageManager|engines|engine-strict|npm@|corepack|npm ci|npm install|npm --version' \
  package.json package-lock.json .github README.md 2>/dev/null || true

printf '%s\n' '--- installed tool availability ---'
node --version 2>/dev/null || true
npm --version 2>/dev/null || true
corepack --version 2>/dev/null || true

Repository: OpenCloudGaming/OpenStroid

Length of output: 23806


🌐 Web query:

Node.js 22 bundled npm version official release documentation npm 11 supported Node.js versions

💡 Result:

Node.js 22 does not bundle npm 11 by default. Node.js 22 continues to ship with npm 10 [1]. npm 11 was introduced as the bundled package manager starting with Node.js 24 [2]. Regarding compatibility, npm 11 explicitly supports Node.js versions ^20.17.0 or >=22.9.0 [3][4][5]. Users running older versions of Node.js 22 (e.g., 22.5.1) who attempt to manually update to npm 11 will receive a warning that their Node.js environment is not supported by that version of npm [5]. Additionally, users should be aware of a known regression affecting npm installations on Node.js 22.22.2, which caused npm commands to fail with a MODULE_NOT_FOUND error due to a missing promise-retry dependency [6][7]. This issue is specific to the 22.22.2 release [6][7]. Official recommendations for resolving this or managing npm versions in Node.js 22 include pinning the Node.js version to 22.22.1 or using corepack to manage the npm version [6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json
from pathlib import Path

package = json.loads(Path("package.json").read_text())
lock = json.loads(Path("package-lock.json").read_text())

print("packageManager:", package.get("packageManager"))
print("package engines:", package.get("engines"))
print("lockfileVersion:", lock.get("lockfileVersion"))
print("workflow npm commands:")
for i, line in enumerate(Path(".github/workflows/ci.yml").read_text().splitlines(), 1):
    if "npm" in line or "node-version" in line or "setup-node" in line:
        print(f"{i}: {line}")
PY

Repository: OpenCloudGaming/OpenStroid

Length of output: 515


🌐 Web query:

site:nodejs.org Node.js v22 downloads npm version bundled

💡 Result:

The npm version bundled with Node.js v22 varies depending on the specific sub-version of the Node.js v22 release line. Because Node.js releases are updated periodically to include newer versions of npm, you can find the bundled npm version by checking the release documentation for your specific v22.x version [1][2][3][4]. For example, earlier releases in the v22.x line bundled older npm versions, such as v10.7.0 in Node.js v22.2.0 [3], while later releases, such as v22.22.2 and v22.22.3, bundle npm v10.9.7 and v10.9.8, respectively [2][4]. To verify the npm version currently installed with your specific version of Node.js, you can run the following command in your terminal: npm -v For the most accurate and up-to-date information regarding your specific installation, please refer to the official Node.js download archives for the v22.x line [1].

Citations:


Use npm 11.16.0 in CI.

Node.js 22 bundles npm 10.x, while package.json declares npm@11.16.0. Install npm 11.16.0 and assert npm --version before npm ci to keep the CI toolchain reproducible.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 34 - 39, Update the “Setup Node.js” CI
step to install the declared npm@11.16.0 after Node.js setup, then assert the
active version with npm --version before the npm ci step. Ensure the workflow
uses npm 11.16.0 consistently for dependency installation.


- name: Cache Playwright browser
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('package-lock.json') }}

- name: Install dependencies
run: npm ci --prefer-offline --no-audit --progress=false

- name: Install Chromium
run: npx playwright install --with-deps chromium

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Test UI
run: npm run test:ui
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ jobs:
path: |
${{ github.workspace }}/.cache/electron
${{ github.workspace }}/.cache/electron-builder
key: ${{ runner.os }}-electron-${{ hashFiles('package-lock.json') }}
key: ${{ matrix.label }}-electron-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-electron-
${{ matrix.label }}-electron-

- name: Install Linux packaging packages
if: runner.os == 'Linux'
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ Download the latest build from [GitHub Releases](https://github.com/OpenCloudGam
## Development

```bash
bun install
npm install
cp .env.example .env
bun run dev
npm run dev
```

### QR login
Expand All @@ -73,10 +73,10 @@ bun run dev

| Command | Description |
|---|---|
| `bun run dev` | Launch the desktop app |
| `bun run build` | Build the app |
| `bun run start` | Run the built app |
| `bun run lint` | Run ESLint |
| `npm run dev` | Launch the desktop app |
| `npm run build` | Build the app |
| `npm run start` | Run the built app |
| `npm run lint` | Run ESLint |

## Repository layout

Expand Down
1,372 changes: 0 additions & 1,372 deletions bun.lock

This file was deleted.

4 changes: 4 additions & 0 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ function registerIpcHandlers() {

await installStreamCookies(launch.cookies);
console.log(`[main] open stream requested session=${launch.streamClientConfig && typeof launch.streamClientConfig === 'object' && 'sessionId' in launch.streamClientConfig ? String(launch.streamClientConfig.sessionId) : 'unknown'}`);
const previousStreamLaunchId = streamLaunchIdsByWebContents.get(event.sender.id);
if (previousStreamLaunchId) pendingStreamLaunches.delete(previousStreamLaunchId);
const streamLaunchId = randomUUID();
pendingStreamLaunches.set(streamLaunchId, launch);
streamLaunchIdsByWebContents.set(event.sender.id, streamLaunchId);
Expand All @@ -104,6 +106,8 @@ function registerIpcHandlers() {
ipcMain.handle('openstroid:get-stream-launch', (event) => {
const streamLaunchId = streamLaunchIdsByWebContents.get(event.sender.id);
const launch = streamLaunchId ? (pendingStreamLaunches.get(streamLaunchId) ?? null) : null;
if (streamLaunchId) pendingStreamLaunches.delete(streamLaunchId);
streamLaunchIdsByWebContents.delete(event.sender.id);
console.log(`[main] stream launch lookup webContents=${event.sender.id} launchId=${streamLaunchId ?? 'none'} found=${Boolean(launch)}`);
return launch;
});
Expand Down
4 changes: 0 additions & 4 deletions electron/preload.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ function installLocalStorageState(state = {}) {
}
}

console.log('[OpenStroid preload] loaded');

contextBridge.exposeInMainWorld('openStroid', {
openStream: (launch) => ipcRenderer.invoke('openstroid:open-stream', launch),
getStreamLaunch: async () => {
console.log('[OpenStroid preload] requesting stream launch');
const launch = await ipcRenderer.invoke('openstroid:get-stream-launch');
console.log('[OpenStroid preload] stream launch response', Boolean(launch), launch?.sessionId);
installLocalStorageState(launch?.localStorage);
return launch;
},
Expand Down
4 changes: 0 additions & 4 deletions electron/preload.cts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,10 @@ function installLocalStorageState(state: Record<string, unknown> = {}) {
}
}

console.log('[OpenStroid preload] loaded');

contextBridge.exposeInMainWorld('openStroid', {
openStream: (launch: StreamLaunchPayload) => ipcRenderer.invoke('openstroid:open-stream', launch) as Promise<{ ok: boolean }>,
getStreamLaunch: async () => {
console.log('[OpenStroid preload] requesting stream launch');
const launch = await ipcRenderer.invoke('openstroid:get-stream-launch') as StreamLaunchPayload | null;
console.log('[OpenStroid preload] stream launch response', Boolean(launch), launch?.streamingUrl);
installLocalStorageState(launch?.localStorage);
return launch;
},
Expand Down
2 changes: 0 additions & 2 deletions electron/preload.js

This file was deleted.

1 change: 0 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<meta name="theme-color" content="#141517" />
<title>OpenStroid — Cloud Gaming</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: #141517; color: #c1c2c5; -webkit-font-smoothing: antialiased; }
</style>
Expand Down
Loading
Loading