update tsconfig

This commit is contained in:
Philipp Kunz 2024-04-14 17:42:04 +02:00
parent 73af0aef92
commit 80cd35199a
4 changed files with 105 additions and 30 deletions

View File

@ -8,14 +8,25 @@
"shortDescription": "a homebridge abstraction package", "shortDescription": "a homebridge abstraction package",
"npmPackagename": "@push.rocks/smarthomebridge", "npmPackagename": "@push.rocks/smarthomebridge",
"license": "MIT", "license": "MIT",
"projectDomain": "push.rocks" "projectDomain": "push.rocks",
"description": "Provides an abstraction layer for homebridge to facilitate smart home integration.",
"keywords": [
"smart home",
"home automation",
"homebridge plugin",
"typescript",
"homebridge abstraction",
"IoT",
"Intelligent Home",
"smart devices integration"
]
} }
}, },
"npmci": { "npmci": {
"npmGlobalTools": [], "npmGlobalTools": [],
"npmAccessLevel": "public" "npmAccessLevel": "public"
}, },
"tsdocs": { "tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n" "legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
} }
} }

View File

@ -2,7 +2,7 @@
"name": "@push.rocks/smarthomebridge", "name": "@push.rocks/smarthomebridge",
"version": "1.0.2", "version": "1.0.2",
"private": false, "private": false,
"description": "a homebridge abstraction package", "description": "Provides an abstraction layer for homebridge to facilitate smart home integration.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH", "author": "Lossless GmbH",
@ -36,5 +36,15 @@
"cli.js", "cli.js",
"npmextra.json", "npmextra.json",
"readme.md" "readme.md"
],
"keywords": [
"smart home",
"home automation",
"homebridge plugin",
"typescript",
"homebridge abstraction",
"IoT",
"Intelligent Home",
"smart devices integration"
] ]
} }

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

107
readme.md
View File

@ -1,39 +1,92 @@
# @pushrocks/smarthomebridge # @push.rocks/smarthomebridge
a homebridge abstraction package a homebridge abstraction package
## Availabililty and Links ## Install
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smarthomebridge)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smarthomebridge)
* [github.com (source mirror)](https://github.com/pushrocks/smarthomebridge)
* [docs (typedoc)](https://pushrocks.gitlab.io/smarthomebridge/)
## Status for master To get started with `@push.rocks/smarthomebridge`, ensure that you have Node.js and npm installed. Then, you can install the package by running:
Status Category | Status Badge ```bash
-- | -- npm install @push.rocks/smarthomebridge --save
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smarthomebridge/badges/master/pipeline.svg)](https://lossless.cloud) ```
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smarthomebridge/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smarthomebridge)](https://lossless.cloud) This command will add `@push.rocks/smarthomebridge` to your projects dependencies and download it.
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smarthomebridge)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smarthomebridge)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smarthomebridge)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smarthomebridge)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage ## Usage
Use TypeScript for best in class intellisense **@push.rocks/smarthomebridge** is designed to serve as an abstraction package for Homebridge, simplifying the integration of various smart home devices with Homebridge. Heres how you can leverage this package in your own projects using TypeScript.
## Contribution ### Setting Up Your Project
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :) Before diving into the usage examples, make sure your project is set up to use TypeScript. This involves having a `tsconfig.json` file configured for your environment, and possibly including the necessary type definitions for node and other libraries you might be using.
For further information read the linked docs at the top of this readme. ### Connecting to Homebridge
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh) First, lets assume you want to create a simple bridge connection to Homebridge and manage devices. The primary step is to import `smarthomebridge` into your TypeScript file.
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com) ```typescript
import * as smarthomebridge from '@push.rocks/smarthomebridge';
```
Given that `@push.rocks/smarthomebridge` acts as an abstraction, you would usually not interact directly with it for creating devices but use it to set up a foundation. Here, for demonstration purposes, lets focus on using it as a preliminary setup before dealing with specific smart home integrations.
### Basic Configuration and Initialization
To start off, you might want to initialize your abstraction layer with Homebridge. Since our package is an abstraction, the real power comes when integrating with various plugins; yet, lets look at a basic setup:
```typescript
// Assuming SmarthomeBridge offers a basic initialization method
smarthomebridge.initialize({
logging: true, // Enable logging for debugging purposes
// Other initializing parameters here
});
```
This snippet is hypothetical and meant to serve as an illustration of how you might begin working with smarthomebridge in a real project. Currently, `smarthomebridge` does not expose such methods directly but expect to define configurations and handle dependencies internally.
### Extending Functionality with Plugins
Working with smarthomebridge means youll likely be extending its functionality through plugins or additional modules to support specific devices or platforms (e.g., lights, thermostats, sensors). As of this writing, you would create these plugins following the standard Homebridge plugin development practices, while `smarthomebridge` might provide utility functions to streamline certain tasks, such as device discovery, state management, or communication protocols.
### Example: Creating a Lightbulb Plugin
In real usage, youd extend smarthomebridge by creating new plugins. For instance, if youre aiming to add a smart lightbulb to your Homebridge setup using smarthomebridge, your TypeScript plugin might look like this:
```typescript
// Import necessary libraries and dependencies
import { SmarthomeDevice } from '@push.rocks/smarthomebridge';
class SmartLightbulb extends SmarthomeDevice {
constructor() {
// Initialize and register the device with smarthomebridge
}
// Define methods for interacting with the smart lightbulb
}
// Instantiate and use your smart lightbulb
const mySmartLightbulb = new SmartLightbulb();
```
This simplified example illustrates the concept of extending the smarthomebridge package to handle specific kinds of smart home devices. The actual implementation will vary based on the devices capabilities, communication protocols, and the Homebridge plugin API.
### Conclusion
While the details provided here are simulated to give a sense of how `@push.rocks/smarthomebridge` might be used in projects, the real value of this package emerges when developers create and integrate it with Homebridge plugins tailored to their home automation needs. The examples above are intended to illustrate potential ways to use the package, but the specifics will depend on the package's evolving implementation and the developer's requirements. Stay tuned to the package's official documentation and source code for the most accurate and up-to-date guidance on utilizing `@push.rocks/smarthomebridge` in your projects.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.