• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

OpenWonderLabs / node-switchbot / 17117994006
33%

Build:
DEFAULT BRANCH: latest
Ran 21 Aug 2025 05:28AM UTC
Jobs 1
Files 18
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Aug 2025 05:27AM UTC coverage: 14.315% (-0.3%) from 14.642%
17117994006

push

github

web-flow
Add comprehensive GitHub Copilot instructions for node-switchbot repository (#300)

This PR adds a comprehensive `.github/copilot-instructions.md` file that
provides GitHub Copilot coding agents with detailed instructions on how
to work effectively in the node-switchbot codebase.

## Key Features

**Validated Commands and Timing**: Every command has been tested from a
clean environment with actual timing measurements:
- `npm install`: ~5-25 seconds (varies by cache)
- `npm run build`: ~5 seconds (TypeScript compilation)
- `npm run test`: ~1 second (12 tests)
- `npm run lint`: ~3 seconds (ESLint validation)

**Platform-Specific Requirements**: Clear documentation of constraints:
- BLE functionality requires Linux-based OS only (Raspbian, Ubuntu,
etc.)
- Windows and macOS are NOT supported for BLE operations
- Node.js versions: ^20, ^22, or ^24 required
- ES Modules: Project uses `"type": "module"`

**Development Workflow**: Step-by-step instructions for common tasks:
- Bootstrap and setup procedures
- Build, test, and lint validation cycles
- Adding new device support
- Working with both BLE and OpenAPI interfaces

**Manual Validation Scenarios**: Specific tests to run after making
changes:
```javascript
// Basic functionality validation
const { SwitchBotBLE, SwitchBotOpenAPI } = require('./dist/index.js');
const ble = new SwitchBotBLE(); // Should not throw
const api = new SwitchBotOpenAPI('test', 'test'); // Should not throw
```

**Timeout Warnings**: Explicit "NEVER CANCEL" warnings with timeout
recommendations for all build operations to prevent premature
cancellation of long-running commands.

## Project Structure Documentation

The instructions include comprehensive information about:
- Source code organization (`src/switchbot-ble.ts`,
`src/switchbot-openapi.ts`, device classes)
- Configuration files (TypeScript, ESLint, package.json)
- Build output structure (`dist/` directory)
- Documentation generation (TypeDoc)

## Validation Completed

All i... (continued)

15 of 24 branches covered (62.5%)

Branch coverage included in aggregate %.

404 of 2903 relevant lines covered (13.92%)

0.14 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
8
15.4
-0.44% src/device.ts
Jobs
ID Job ID Ran Files Coverage
1 run-22 - 17117994006.1 21 Aug 2025 05:28AM UTC 18
14.31
GitHub Action Run
Source Files on build 17117994006
  • Tree
  • List 18
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #17117994006
  • d64cb321 on github
  • Prev Build on latest (#16524572898)
  • Next Build on latest (#17275058090)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc