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
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install
- run: npm run typecheck
- run: npm test
- run: git diff --exit-code -- dist
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,25 @@ State is persisted only for the lifetime of the current OpenFox process. This
allows disable/re-enable without losing a running status while preventing stale
"running" state from surviving an OpenFox restart.

## TypeScript and distribution

The maintained source is TypeScript in `src/index.ts`, with strict checking
enabled. `src/openfox-plugin.d.ts` is a narrow compile-time mirror of the
pending #370/#374 OpenFox contracts; once those contracts ship in a released
OpenFox package it can be replaced by the published `openfox/plugin` types.

OpenFox's GitHub plugin installer clones repositories and loads the configured
entry point; it does not build TypeScript. For that reason the generated
`dist/index.js` is committed and `openfox.entry` points to it. CI rebuilds
`dist` and fails if the checked-in output is stale.

## Scope

The plugin does **not**:

- start or stop dev servers;
- modify `.openfox/dev.json`;
- import OpenFox private internals;
- import OpenFox private runtime internals;
- patch React components;
- open its own sockets or polling process.

Expand All @@ -71,6 +83,7 @@ Its only capabilities are `ui`, `hooks` and `rpc`.

```bash
npm install
npm run typecheck
npm test
```

Expand Down
2 changes: 2 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import type { PluginRegistry } from 'openfox/plugin';
export declare function register(registry: PluginRegistry): void;
168 changes: 168 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "openfox-devserver-status",
"version": "0.1.0",
"version": "0.2.0",
"description": "Passive per-session dev-server status indicators for OpenFox",
"type": "module",
"main": "./src/index.js",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"src",
"dist",
"README.md"
],
"openfox": {
"apiVersion": 2,
"entry": "./src/index.js",
"entry": "./dist/index.js",
"displayName": "Dev Server Status",
"description": "Shows the live dev-server state directly on OpenFox session rows.",
"capabilities": [
Expand All @@ -21,6 +22,12 @@
"timeoutMs": 5000
},
"scripts": {
"test": "node --test"
"build": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "npm run build && node --test test/index.test.js",
"prepack": "npm run build"
},
"devDependencies": {
"typescript": "^5.8.3"
}
}
Loading
Loading