update tsconfig

This commit is contained in:
Philipp Kunz 2024-04-14 17:47:39 +02:00
parent de71b938aa
commit 7beffc8b72
4 changed files with 102 additions and 35 deletions

View File

@ -9,12 +9,19 @@
"githost": "code.foss.global", "githost": "code.foss.global",
"gitscope": "push.rocks", "gitscope": "push.rocks",
"gitrepo": "smartlegal", "gitrepo": "smartlegal",
"description": "go legal programmatically", "description": "A module for handling legal aspects of software projects programmatically, including license checking.",
"npmPackagename": "@push.rocks/smartlegal", "npmPackagename": "@push.rocks/smartlegal",
"license": "MIT" "license": "MIT",
"keywords": [
"legal",
"license checking",
"programmatic compliance",
"software licensing",
"dependency management"
]
} }
}, },
"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/smartlegal", "name": "@push.rocks/smartlegal",
"version": "1.0.27", "version": "1.0.27",
"private": false, "private": false,
"description": "go legal programmatically", "description": "A module for handling legal aspects of software projects programmatically, including license checking.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"scripts": { "scripts": {
@ -16,9 +16,10 @@
}, },
"keywords": [ "keywords": [
"legal", "legal",
"docs", "license checking",
"privacy", "programmatic compliance",
"policy" "software licensing",
"dependency management"
], ],
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
@ -57,4 +58,4 @@
"last 1 chrome versions" "last 1 chrome versions"
], ],
"type": "module" "type": "module"
} }

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

112
readme.md
View File

@ -1,41 +1,99 @@
# @push.rocks/smartlegal # @push.rocks/smartlegal
go legal programmatically go legal programmatically
## Availabililty and Links ## Install
* [npmjs.org (npm package)](https://www.npmjs.com/package/@push.rocks/smartlegal)
* [gitlab.com (source)](https://gitlab.com/push.rocks/smartlegal)
* [github.com (source mirror)](https://github.com/push.rocks/smartlegal)
* [docs (typedoc)](https://push.rocks.gitlab.io/smartlegal/)
## Status for master You can install `@push.rocks/smartlegal` using npm:
Status Category | Status Badge ```bash
-- | -- npm install @push.rocks/smartlegal --save
GitLab Pipelines | [![pipeline status](https://gitlab.com/push.rocks/smartlegal/badges/master/pipeline.svg)](https://lossless.cloud) ```
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/push.rocks/smartlegal/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@push.rocks/smartlegal)](https://lossless.cloud) Or using Yarn:
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/push.rocks/smartlegal)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud) ```bash
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/) yarn add @push.rocks/smartlegal
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/smartlegal)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@push.rocks/smartlegal)](https://lossless.cloud) Ensure you have TypeScript and the necessary TypeScript types installed for optimal development experience:
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@push.rocks/smartlegal)](https://lossless.cloud)
```bash
npm install typescript @types/node --save-dev
```
## Usage ## Usage
Use TypeScript for best in class instellisense. `@push.rocks/smartlegal` offers a streamlined approach to handling legal operations programmatically. It is designed with ease-of-use in mind, allowing developers to integrate legal checks into their workflow. The primary feature as showcased in the current version is a license checker, which is invaluable for projects that need to ensure compliance with legal requirements regarding dependencies' licenses.
smartlegal implements
- a license checker for checking dependency trees against a set of licenses ### Getting Started
## Contribution To use `@push.rocks/smartlegal`, first import the module in your TypeScript 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). :) ```typescript
import { createLicenseChecker } from '@push.rocks/smartlegal';
```
For further information read the linked docs at the top of this readme. ### Checking Licenses
## Legal The module provides functions to either include or exclude specific licenses within your project's dependencies, making it easier to manage legal compliance.
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) #### Excluding Specific Licenses
If you want to exclude specific licenses, you may use the `excludeLicenseWithinPath` function. This function checks all dependencies and lists those not compliant with the specified licenses.
```typescript
(async () => {
const licenseChecker = await createLicenseChecker();
const checkResult = await licenseChecker.excludeLicenseWithinPath('./', ['MIT']);
console.log('Passing modules (compliant):', checkResult.passingModules);
console.log('Failing modules (non-compliant):', checkResult.failingModules);
})();
```
#### Including Specific Licenses
Conversely, to ensure only dependencies with certain licenses are used, employ the `includeLicencesWithinPath` function.
```typescript
(async () => {
const licenseChecker = await createLicenseChecker();
const checkResult = await licenseChecker.includeLicencesWithinPath('./', ['MIT']);
console.log('Passing modules (compliant):', checkResult.passingModules);
console.log('Failing modules (non-compliant):', checkResult.failingModules);
})();
```
### Understanding the Results
Both `excludeLicenseWithinPath` and `includeLicencesWithinPath` methods return a `CheckResult` object containing two arrays: `passingModules` and `failingModules`.
- `passingModules` includes all dependencies that meet your specified criteria (either included or excluded licenses).
- `failingModules` lists those dependencies that do not meet the criteria, aiding in identifying potential legal compliance issues quickly.
### Integration into CI/CD Pipelines
`@push.rocks/smartlegal` is designed to be easily integrated into CI/CD pipelines, enabling automated checks for license compliance. By incorporating the above examples into your build or deployment scripts, you can halt the pipeline if non-compliant dependencies are detected, ensuring legal compliance at each stage of development.
## Conclusion
`@push.rocks/smartlegal` provides an essential tool for managing the legal aspects of your project's dependencies. By leveraging its functionality, developers can ensure compliance with legal requirements, minimizing risks associated with software licenses. As projects evolve and dependencies change, `@push.rocks/smartlegal` simplifies the ongoing maintenance of legal compliance, making it an invaluable addition to any project.
## 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.