-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * Create set.response.json * Create ls.response.json * Create ls2.response.json * Create props.response.json * Create info.response.json * Create stat.response.json * Create unsupported-version.error.json * wip * Create ParamsSerializer.ts * Create ParamsSerializer.spec.ts * wip * wip * wip * wip * wip * wip * wip * Delete stat.response.json * Update CoolMasterNetConnection.spec.ts * wip * wip * wip * wip * wip * Update CoolMasterNetConnection.spec.ts * Update CoolMasterNetConnection.spec.ts * Create test.yml * Update CoolMasterNetConnection.spec.ts * Update CoolMasterNetConnection.spec.ts * wip * wip * wip * wip * added set * wip * wip * wip * wip * wip * wip * wip * wip * lowered complexity of connection + partial lint * wip * Update boot-required.response.json * added properties and settings as subcommands * Added prop set, closes #1 * wip * Added `callGeneric` * Update README.md * Update README.md * Add files via upload * Update README.md
- Loading branch information
Showing
64 changed files
with
9,350 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
const IN_PRODUCTION = process.env.NODE_ENV !== 'production' | ||
|
||
const OFF = 0 | ||
const WARN = 1 | ||
const ERR = 2 | ||
|
||
module.exports = { | ||
root: true, | ||
|
||
ignorePatterns: [ | ||
'/*', | ||
'!/src' | ||
], | ||
|
||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended' | ||
], | ||
|
||
parser: '@typescript-eslint/parser', | ||
|
||
plugins: [ | ||
'@typescript-eslint', | ||
'eslint-plugin-align-import' | ||
], | ||
|
||
rules: { | ||
'camelcase': ERR, | ||
'complexity': [WARN, {max: 4}], | ||
'comma-spacing': [ERR, { before: false, after: true }], | ||
'key-spacing': [ERR, { align: 'value' }], | ||
'eol-last': [ERR, 'always'], | ||
'linebreak-style': [ERR, 'unix'], | ||
'no-console': IN_PRODUCTION ? OFF : ERR, | ||
'no-duplicate-imports': ERR, | ||
'no-empty': [ERR, { allowEmptyCatch: true }], | ||
'no-extra-parens': ERR, | ||
'no-trailing-spaces': [ERR, { ignoreComments: true }], | ||
'no-useless-rename': ERR, | ||
'object-curly-newline': [ERR, { | ||
ObjectExpression: { multiline: true }, | ||
ObjectPattern: { multiline: true }, | ||
ImportDeclaration: { multiline: true, minProperties: 4 }, | ||
ExportDeclaration: { multiline: true, minProperties: 4 } | ||
}], | ||
'object-curly-spacing': [ERR, 'always'], | ||
'quotes': [ERR, 'single'], | ||
'semi': [ERR, 'never'], | ||
'spaced-comment': [ERR, 'always', { exceptions: ['-', '+'] }], | ||
'space-infix-ops': ERR, | ||
|
||
'align-import/align-import': ERR, | ||
'@typescript-eslint/ban-ts-comment': OFF | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.js text eol=lf | ||
*.ts text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: π Publish | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
publish: | ||
name: π Publish | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: π Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: π΅ Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: β¬ Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: π Build | ||
run: npm run build | ||
|
||
- name: π Publish | ||
run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: π§ͺ Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
jobs: | ||
test: | ||
name: π§ͺ Test | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: π Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: π΅ Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
|
||
- name: β¬ Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: π§ͺ Run tests | ||
run: npm run test:cov | ||
|
||
- name: π― Coverage | ||
uses: paambaati/[email protected] | ||
if: github.ref == 'refs/heads/develop' | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,40 @@ | ||
# CoolMasterNet Client | ||
|
||
> CoolMasterNet API Client for TypeScript | ||
**CoolMasterNet API Client for TypeScript** | ||
|
||
π§π§π§ Work in Progress π§π§π§ | ||
<a href="https://github.com/bdsoha/coolmaster-client/actions/workflows/test.yml"> | ||
<img alt="GitHub Workflow" src="https://img.shields.io/github/actions/workflow/status/bdsoha/coolmaster-client/test.yml?branch=develop&logo=github&style=for-the-badge"> | ||
</a> | ||
|
||
<a href="https://codeclimate.com/github/bdsoha/coolmaster-client"> | ||
<img alt="Code Climate maintainability" src="https://img.shields.io/codeclimate/maintainability/bdsoha/coolmaster-client?logo=codeclimate&style=for-the-badge"> | ||
</a> | ||
|
||
<a href="https://codeclimate.com/github/bdsoha/coolmaster-client"> | ||
<img alt="Code Climate coverage" src="https://img.shields.io/codeclimate/coverage/bdsoha/coolmaster-client?logo=codeclimate&style=for-the-badge"> | ||
</a> | ||
|
||
![Banner](coolautomation.jpg) | ||
|
||
--- | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install coolmaster-client | ||
``` | ||
|
||
## Usage | ||
|
||
```ts | ||
import { CoolMasterNetClient } from 'coolmaster-client' | ||
|
||
const client = CoolMasterNetClient.create({ | ||
host: '192.168.1.111', | ||
port: 1234, // Optional, defaults to `10103` | ||
secure: true, // Optional, defaults to `false` | ||
device: '443B960055F0', | ||
}) | ||
|
||
const results = await client.ls2() | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
|
||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
collectCoverageFrom: [ | ||
'src/**/*', | ||
'!src/**/index.ts', | ||
'!src/__stubs__/*', | ||
], | ||
moduleNameMapper: { | ||
"^@src/(.*)$": "<rootDir>/src/$1" | ||
} | ||
} | ||
} |
Oops, something went wrong.