update tsconfig
This commit is contained in:
parent
65a9b7f504
commit
37a00db7c8
@ -5,17 +5,26 @@
|
||||
"githost": "code.foss.global",
|
||||
"gitscope": "push.rocks",
|
||||
"gitrepo": "smartwhois",
|
||||
"description": "a package for dealing with whois requests",
|
||||
"description": "A package for executing WHOIS requests and processing domain and IP information.",
|
||||
"npmPackagename": "@push.rocks/smartwhois",
|
||||
"license": "MIT",
|
||||
"projectDomain": "push.rocks"
|
||||
"projectDomain": "push.rocks",
|
||||
"keywords": [
|
||||
"WHOIS",
|
||||
"domain information",
|
||||
"IP lookup",
|
||||
"TLD validation",
|
||||
"DNSSEC status",
|
||||
"HTTP status checker",
|
||||
"TypeScript"
|
||||
]
|
||||
}
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"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"
|
||||
}
|
||||
}
|
13
package.json
13
package.json
@ -2,7 +2,7 @@
|
||||
"name": "@push.rocks/smartwhois",
|
||||
"version": "1.0.16",
|
||||
"private": false,
|
||||
"description": "a package for dealing with whois requests",
|
||||
"description": "A package for executing WHOIS requests and processing domain and IP information.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"type": "module",
|
||||
@ -42,5 +42,14 @@
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"keywords": [
|
||||
"WHOIS",
|
||||
"domain information",
|
||||
"IP lookup",
|
||||
"TLD validation",
|
||||
"DNSSEC status",
|
||||
"HTTP status checker",
|
||||
"TypeScript"
|
||||
]
|
||||
}
|
||||
}
|
1
readme.hints.md
Normal file
1
readme.hints.md
Normal file
@ -0,0 +1 @@
|
||||
|
130
readme.md
130
readme.md
@ -1,37 +1,117 @@
|
||||
# @push.rocks/smartwhois
|
||||
a package for dealing with whois requests
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@push.rocks/smartwhois)
|
||||
* [gitlab.com (source)](https://gitlab.com/push.rocks/smartwhois)
|
||||
* [github.com (source mirror)](https://github.com/push.rocks/smartwhois)
|
||||
* [docs (typedoc)](https://push.rocks.gitlab.io/smartwhois/)
|
||||
## Install
|
||||
To install `@push.rocks/smartwhois`, you can use npm or yarn. First, open your terminal, then execute one of the following commands in your project directory:
|
||||
|
||||
## Status for master
|
||||
```sh
|
||||
npm install @push.rocks/smartwhois --save
|
||||
```
|
||||
or
|
||||
```sh
|
||||
yarn add @push.rocks/smartwhois
|
||||
```
|
||||
|
||||
Status Category | Status Badge
|
||||
-- | --
|
||||
GitLab Pipelines | [![pipeline status](https://gitlab.com/push.rocks/smartwhois/badges/master/pipeline.svg)](https://lossless.cloud)
|
||||
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/push.rocks/smartwhois/badges/master/coverage.svg)](https://lossless.cloud)
|
||||
npm | [![npm downloads per month](https://badgen.net/npm/dy/@push.rocks/smartwhois)](https://lossless.cloud)
|
||||
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/push.rocks/smartwhois)](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/@push.rocks/smartwhois)](https://lossless.cloud)
|
||||
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@push.rocks/smartwhois)](https://lossless.cloud)
|
||||
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@push.rocks/smartwhois)](https://lossless.cloud)
|
||||
This will add `@push.rocks/smartwhois` to your project's dependencies.
|
||||
|
||||
## Usage
|
||||
The `@push.rocks/smartwhois` module provides an intuitive TypeScript interface for dealing with WHOIS requests. It allows you to gather WHOIS information for domains, including registration details, registrar information, and more. For using this module, it is highly recommended to be familiar with TypeScript and async/await patterns for promise handling.
|
||||
|
||||
Use TypeScript for best in class intellisense
|
||||
### Getting Started
|
||||
First, ensure that you import the necessary classes from the module. The primary class you will interact with is `SmartWhois`.
|
||||
|
||||
## Contribution
|
||||
```typescript
|
||||
import { SmartWhois } from '@push.rocks/smartwhois';
|
||||
|
||||
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). :)
|
||||
// Create an instance of SmartWhois
|
||||
const smartWhois = new SmartWhois();
|
||||
```
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
### Fetching WHOIS Information for a Domain
|
||||
The most common operation is to fetch WHOIS information for a given domain. This can easily be done using the `getWhoisForDomain` method, which returns detailed WHOIS information.
|
||||
|
||||
## Legal
|
||||
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
```typescript
|
||||
async function getDomainWhois() {
|
||||
const domainInfo = await smartWhois.getWhoisForDomain('example.com');
|
||||
console.log(domainInfo);
|
||||
}
|
||||
getDomainWhois();
|
||||
```
|
||||
|
||||
### Determining Domain Delegation
|
||||
To understand the structure of a domain or URL, you can use `getDomainDelegation`. This method provides insights into various components of a domain or URL, such as its TLD, domain name, etc.
|
||||
|
||||
```typescript
|
||||
async function checkDomainDelegation() {
|
||||
const delegationInfo = await smartWhois.getDomainDelegation('https://www.example.com/path');
|
||||
console.log(delegationInfo);
|
||||
}
|
||||
checkDomainDelegation();
|
||||
```
|
||||
|
||||
### Additional WHOIS Data
|
||||
For some domains, additional WHOIS data beyond the basics might be useful. This includes HTTPS status, headers, and more. Retrieving additional data is straightforward:
|
||||
|
||||
```typescript
|
||||
async function fetchAdditionalData() {
|
||||
const additionalData = await smartWhois.getAdditionalWhoisDataForDomain('example.com');
|
||||
console.log(additionalData);
|
||||
}
|
||||
fetchAdditionalData();
|
||||
```
|
||||
|
||||
### Validating TLDs
|
||||
When working with various top-level domains (TLDs), you might want to verify if a given TLD is valid. The `isValidTld` method helps check the validity of a TLD:
|
||||
|
||||
```typescript
|
||||
async function isTldValid() {
|
||||
const isValid = await smartWhois.isValidTld('.com');
|
||||
console.log(`Is .com a valid TLD? ${isValid}`);
|
||||
}
|
||||
isTldValid();
|
||||
```
|
||||
|
||||
### Handling Errors
|
||||
When making requests, there is always a possibility of running into errors due to network issues, invalid domains, or other reasons. It's crucial to properly handle these cases:
|
||||
|
||||
```typescript
|
||||
async function safelyGetWhois() {
|
||||
try {
|
||||
const whoisInfo = await smartWhois.getWhoisForDomain('nonexistentdomain.xyz');
|
||||
console.log(whoisInfo);
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch WHOIS info:', error);
|
||||
}
|
||||
}
|
||||
safelyGetWhois();
|
||||
```
|
||||
|
||||
### Integration with Other Systems
|
||||
The retrieved WHOIS data can be easily integrated into other parts of your application or system. For instance, you could store the data in a database, use it to monitor domain registration changes, or create alerts for domain expiry dates.
|
||||
|
||||
### Advanced Usage
|
||||
While the above examples cover the basics, `@push.rocks/smartwhois` offers much more. Explore the source code and TypeScript definitions to uncover additional functionality, such as parsing complex WHOIS server responses, handling internationalized domain names (IDNs), and more.
|
||||
|
||||
### Summary
|
||||
`@push.rocks/smartwhois` is a powerful tool for querying WHOIS information, designed with modern development practices in mind. By leveraging TypeScript, it offers a robust and type-safe way to integrate WHOIS data into your applications, enriching your projects with valuable domain-related insights.
|
||||
|
||||
For further information and the latest updates, refer to the official documentation and GitHub repository.
|
||||
|
||||
## 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.
|
||||
|
Loading…
Reference in New Issue
Block a user