Skip to content
Open
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
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,11 @@ jobs:
- name: Run Biome Check
run: npx @biomejs/biome ci .

- name: Run Tests
run: npm run test

- name: Build Package
run: npm run build:package

- name: Run Build
run: npm run build
88 changes: 88 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Package CI & Publish

on:
push:
branches:
- main
- master
paths:
- "packages/rein-input/**"
- ".github/workflows/package.yml"
pull_request:
paths:
- "packages/rein-input/**"
- ".github/workflows/package.yml"
Comment thread
Aryan-en marked this conversation as resolved.
release:
types: [published]
workflow_dispatch:
inputs:
publish:
description: "Publish to npm"
required: false
type: boolean
default: false

jobs:
test-package:
name: Test on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v4
Comment thread
Aryan-en marked this conversation as resolved.

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
Comment thread
Aryan-en marked this conversation as resolved.

- name: Install dependencies
run: npm install

- name: Run Tests
run: npm run test

- name: Build Package
run: npm run build:package

- name: Verify Package Tarball
run: |
cd packages/rein-input
npm pack --dry-run
Comment thread
Aryan-en marked this conversation as resolved.

publish-package:
name: Publish to npm
needs: test-package
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.publish == true)
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: npm install

- name: Build Package
run: npm run build:package

- name: Publish @aossie/rein-input
run: |
cd packages/rein-input
npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ Quality couch keyboards are not so accessible, STT on Linux isn’t in a good st
* **Framework**: [TanStack Start](https://tanstack.com/start)
* **Language**: TypeScript
* **Real-time**: WebRTC
* **Input Simulation**: Koffi
* **Input Simulation**: Koffi / [@aossie/rein-input](packages/rein-input)

## Reusable Packages

* **[`@aossie/rein-input`](packages/rein-input)**: Standalone, cross-platform native input injection library for Node.js and Electron with sub-millisecond latency and zero C++ addon compilation. Available on npm:
```bash
npm install @aossie/rein-input koffi
```
Comment thread
Aryan-en marked this conversation as resolved.

## Development Setup

Expand Down
2 changes: 2 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.8/schema.json",

Check notice on line 2 in biome.json

View workflow job for this annotation

GitHub Actions / validate

deserialize

The configuration schema version does not match the CLI version 2.5.1
"vcs": {
"enabled": false,
"clientKind": "git",
Expand All @@ -9,6 +9,8 @@
"ignoreUnknown": false,
"includes": [
"src/**/*",
"packages/**/*",
"!packages/**/dist/**/*",
".vscode/**/*",
"index.html",
"vite.config.ts",
Expand Down
Loading
Loading