update tsconfig

This commit is contained in:
Philipp Kunz 2024-04-14 17:15:51 +02:00
parent 5ac7470e24
commit ecc5dee2ee
4 changed files with 108 additions and 44 deletions

View File

@ -9,12 +9,20 @@
"githost": "code.foss.global", "githost": "code.foss.global",
"gitscope": "push.rocks", "gitscope": "push.rocks",
"gitrepo": "projectinfo", "gitrepo": "projectinfo",
"description": "gather information about projects. supports npm, git etc.", "description": "A tool for gathering project information, supporting npm, git, and more.",
"npmPackagename": "@push.rocks/projectinfo", "npmPackagename": "@push.rocks/projectinfo",
"license": "MIT" "license": "MIT",
"keywords": [
"project-info",
"npm",
"git",
"typescript",
"package-info",
"repository"
]
} }
}, },
"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/projectinfo", "name": "@push.rocks/projectinfo",
"version": "5.0.2", "version": "5.0.2",
"private": false, "private": false,
"description": "gather information about projects. supports npm, git etc.", "description": "A tool for gathering project information, supporting npm, git, and more.",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts", "typings": "dist_ts/index.d.ts",
"type": "module", "type": "module",
@ -16,11 +16,12 @@
"url": "git+https://gitlab.com/pushrocks/projectinfo.git" "url": "git+https://gitlab.com/pushrocks/projectinfo.git"
}, },
"keywords": [ "keywords": [
"project", "project-info",
"npm", "npm",
"git", "git",
"info", "typescript",
"package" "package-info",
"repository"
], ],
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
@ -29,9 +30,9 @@
}, },
"homepage": "https://gitlab.com/pushrocks/projectinfo#readme", "homepage": "https://gitlab.com/pushrocks/projectinfo#readme",
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.66", "@git.zone/tsbuild": "^2.1.66",
"@gitzone/tsrun": "^1.2.44", "@git.zone/tsrun": "^1.2.44",
"@gitzone/tstest": "^1.0.77", "@git.zone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.12", "@push.rocks/tapbundle": "^5.0.12",
"@types/node": "^20.4.8" "@types/node": "^20.4.8"
}, },
@ -56,4 +57,4 @@
"browserslist": [ "browserslist": [
"last 1 chrome versions" "last 1 chrome versions"
] ]
} }

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

120
readme.md
View File

@ -1,49 +1,103 @@
# @push.rocks/projectinfo # @push.rocks/projectinfo
gather information about projects. supports npm, git etc. gather information about projects. supports npm, git etc.
## Availabililty and Links ## Install
* [npmjs.org (npm package)](https://www.npmjs.com/package/@push.rocks/projectinfo)
* [gitlab.com (source)](https://gitlab.com/push.rocks/projectinfo)
* [github.com (source mirror)](https://github.com/push.rocks/projectinfo)
* [docs (typedoc)](https://push.rocks.gitlab.io/projectinfo/)
## Status for master To install `@push.rocks/projectinfo`, you need a Node.js environment with npm. It's recommended to have TypeScript and ts-node installed for the best development experience. Run the following command:
Status Category | Status Badge ```bash
-- | -- npm install @push.rocks/projectinfo --save
GitLab Pipelines | [![pipeline status](https://gitlab.com/push.rocks/projectinfo/badges/master/pipeline.svg)](https://lossless.cloud) ```
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/push.rocks/projectinfo/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@push.rocks/projectinfo)](https://lossless.cloud) This will add it to your project's `package.json` file and download the package into the `node_modules` folder.
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/push.rocks/projectinfo)](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/projectinfo)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@push.rocks/projectinfo)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@push.rocks/projectinfo)](https://lossless.cloud)
## Usage ## Usage
Use TypeScript for best in class instellisense. The `@push.rocks/projectinfo` module provides a powerful interface to gather detailed information about your projects, focusing on common project management tools like npm and git. Below are various examples and use cases demonstrating how to use this module effectively.
```javascript ### Setup
import { ProjectInfo } from 'projectinfo';
let myProjectInfo = new ProjectInfo('/some/path/to/proejct'); First, make sure to import `ProjectInfo` from the package in your TypeScript file. Here's how to get started:
let npmName = myProjectInfo.npm.name; // returns npm name from package.json
let npmVersion = myProjectInfo.npm.version; // returns version from package.json
let gitRepo = myProjectInfo.git.gitrepo; // returns the name of the gitrepo
let gitRemotes = myProjectInfo.git.remotes; // returns array with registered remotes
// for more info check out the module in your IDE with TypeScript intellisense enabled ```typescript
import { ProjectInfo } from '@push.rocks/projectinfo';
``` ```
## Contribution ### Gathering NPM Information
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). :) If you wish to extract npm-related information such as the project name and version from your `package.json`, you can instantiate `ProjectInfo` and access the `npm` property.
For further information read the linked docs at the top of this readme. ```typescript
const projectInfo = new ProjectInfo('./path/to/your/project');
console.log(`Project Name: ${projectInfo.npm.name}`);
console.log(`Project Version: ${projectInfo.npm.version}`);
```
## Legal This example assumes that your current working directory (`cwd`) is set correctly relative to your project. Adjust `'./path/to/your/project'` as necessary.
> MIT licensed | **©** [Task Venture Capital GmbH](https://task.vc)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy) ### Accessing Git Information
Similarly, to extract git-related information, you can access the `git` property. This allows you to get details about the git repository;
```typescript
console.log(`Git Repository: ${projectInfo.git.gitrepo}`);
// Outputs the git repository name
console.log(`Git User/Organization: ${projectInfo.git.gituser}`);
// Outputs the git user or organization name
```
It is important to note that these git properties are parsed from the local git configuration, so your project needs to be initialized with git and properly configured.
### Working with Asynchronous Operations
While the basic usage examples above are synchronous, `@push.rocks/projectinfo` might also offer functionality that requires async/await for operations that involve I/O processes, such as reading files or fetching data from remote APIs. Always refer to the specific method documentation to understand its nature (synchronous or asynchronous) and use it appropriately in your code.
### Integrating with Other Push.rocks Modules
The `@push.rocks/projectinfo` package is designed to work seamlessly with other packages from the Push.rocks suite. For instance, it utilizes `@push.rocks/smartfile` for efficient file handling, `@push.rocks/smartpath` for path manipulations, and `@push.rocks/smartpromise` for enhanced promise-based operations. This interconnectivity allows for a more integrated and efficient toolset when managing complex project setups.
### Advanced Usage and Customization
For more advanced use cases, such as customizing the way information is gathered or integrating `@push.rocks/projectinfo` into larger workflows, you are encouraged to explore the package's source code and accompanying documentation. The modular design and comprehensive TypeScript typings facilitate customization and extension to meet specific project requirements.
### Error Handling
When utilizing `@push.rocks/projectinfo` in your project automation or scripts, make sure to implement proper error handling. This helps in gracefully handling situations where project information might be missing, malformatted, or when underlying tools (npm, git) are not available in the environment.
```typescript
try {
const projectInfo = new ProjectInfo('./path/to/your/project');
// Use projectInfo as needed
} catch (error) {
console.error('Failed to gather project info:', error);
}
```
### Summary
`@push.rocks/projectinfo` offers a versatile and powerful API for gathering and managing project information, making it an invaluable tool for developers looking to automate project setups, CI/CD pipelines, or simply organize and access project metadata more efficiently. Its integration with npm and git provides a solid foundation for extracting, analyzing, and utilizing essential project data across various aspects of software development and deployment workflows.
By leveraging TypeScript for development, users are afforded the benefits of static typing, including better autocompletion, easier refactorings, and improved code quality. This document has outlined basic and advanced usage scenarios, aiming to equip developers with the knowledge to effectively incorporate `@push.rocks/projectinfo` into their projects.
Note: The examples above are designed to be straightforward and easy to follow. Depending on the complexity and requirements of your specific project, you might need to adapt these examples. Always refer to the official documentation and TypeScript typings for the most accurate and up-to-date information.
## 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.