Compare commits

..

No commits in common. "master" and "v1.0.0" have entirely different histories.

27 changed files with 230 additions and 5379 deletions

View File

@ -1,66 +0,0 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build

View File

@ -1,124 +0,0 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm publish
metadata:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install -g @gitzone/tsdoc
npmci command tsdoc
continue-on-error: true

23
.gitignore vendored
View File

@ -1,20 +1,7 @@
.nogit/ .idea/
# artifacts
coverage/ coverage/
public/ node_modules
pages/
# installs ts/**/*.js
node_modules/ ts/**/*.js.map
ts/typings/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_*/
# custom

12
.travis.yml Normal file
View File

@ -0,0 +1,12 @@
language: node_js
node_js:
- 'v4.2.6'
- 'stable'
deploy:
provider: npm
email: npm@lossless.digital
api_key:
secure: G2ZQYeDEokGCWQcXeT9SJ4aUF0uZ41B1kM9WD7hZKMGM5hzbGSTXjd/bLWf2HfujvN9FWQYVv0y5OpbRck4xTuEDBPmC5AqXCfrtNj77n151VLO0cF4+Ya1l8OQWvw13hX+cux8UfxRVHUAxUt7CoW3q6FBO/vt1Mvo9u9ucxKdB4QHXmPdq8TwuFusPJYC+l2LdWiaSCEz2LpnyrDf6OjLl2Bt+8rID3Ikbi+5yXWv/n7bfiXyIlpJX/i4Efh/mqsSWp+ziVWaSdKdpYMFPxqyOfqQ/kjbzLCwdR72cD3+UoJPdGQ46Vq3ncZRq3KighWkYRzN76EOTI/quzfcAoz5CekETPh419lPuqs2w8wEeE2oP0yCCSH1SG1ljH8ASrADWsoHzWyVa8c/ovzWMOc3hgLey6xgbYVar0sC94bjjqJh8Y5qOak4idOpI/SXf0UT1TkirZTGfdSgRzg/E1Zqj262sxLeIv0yHsbnzgwUduj6PjfLztgLVAGO13csxksUSiKxT8Mbbqozv1sdz/0SgoZTMYfZSO5kYdBCqguJkJdEj1Dr4tM/0ca+mugHibavQxPJiWqnfNqxdlmywpzPHPHe5G2wzba2W62l3yPHF4rJBJuUi35ddWWOkAN1g9D2NHlByWfqF+WYRuTv1DPlw7ZpmgEVPPUlBPhC5YO8=
on:
tags: true
repo: pushrocks/projectinfo

11
.vscode/launch.json vendored
View File

@ -1,11 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"type": "node-terminal"
}
]
}

26
.vscode/settings.json vendored
View File

@ -1,26 +0,0 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}
}
}
}
]
}

16
dist/index.js vendored Normal file
View File

@ -0,0 +1,16 @@
var projectinfo = {};
//classes
var ProjectinfoNPM = require("./projectinfo.npm");
projectinfo.npm = function (cwdArg) {
return new ProjectinfoNPM(cwdArg);
};
//quick functions
projectinfo.getName = function (cwdArg) {
var localNpm = projectinfo.npm(cwdArg);
if (localNpm.status === "ok") {
return localNpm.name;
}
};
module.exports = projectinfo;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLElBQUksV0FBVyxHQUFPLEVBQUUsQ0FBQztBQUV6QixTQUFTO0FBQ1QsSUFBTyxjQUFjLFdBQVcsbUJBQW1CLENBQUMsQ0FBQztBQUNyRCxXQUFXLENBQUMsR0FBRyxHQUFHLFVBQVMsTUFBTTtJQUM3QixNQUFNLENBQUMsSUFBSSxjQUFjLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDdEMsQ0FBQyxDQUFDO0FBRUYsaUJBQWlCO0FBQ2pCLFdBQVcsQ0FBQyxPQUFPLEdBQUcsVUFBUyxNQUFNO0lBQ2pDLElBQUksUUFBUSxHQUFHLFdBQVcsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDdkMsRUFBRSxDQUFDLENBQUMsUUFBUSxDQUFDLE1BQU0sS0FBSyxJQUFJLENBQUMsQ0FBQSxDQUFDO1FBQzFCLE1BQU0sQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDO0lBQ3pCLENBQUM7QUFDTCxDQUFDLENBQUM7QUFZRixpQkFBUyxXQUFXLENBQUMiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XG5pbXBvcnQgcGx1Z2lucyA9IHJlcXVpcmUoXCIuL3Byb2plY3RpbmZvLnBsdWdpbnNcIik7XG52YXIgcHJvamVjdGluZm86YW55ID0ge307XG5cbi8vY2xhc3Nlc1xuaW1wb3J0IFByb2plY3RpbmZvTlBNID0gcmVxdWlyZShcIi4vcHJvamVjdGluZm8ubnBtXCIpO1xucHJvamVjdGluZm8ubnBtID0gZnVuY3Rpb24oY3dkQXJnKXtcbiAgICByZXR1cm4gbmV3IFByb2plY3RpbmZvTlBNKGN3ZEFyZyk7XG59O1xuXG4vL3F1aWNrIGZ1bmN0aW9uc1xucHJvamVjdGluZm8uZ2V0TmFtZSA9IGZ1bmN0aW9uKGN3ZEFyZyl7XG4gICAgdmFyIGxvY2FsTnBtID0gcHJvamVjdGluZm8ubnBtKGN3ZEFyZyk7XG4gICAgaWYgKGxvY2FsTnBtLnN0YXR1cyA9PT0gXCJva1wiKXtcbiAgICAgICAgcmV0dXJuIGxvY2FsTnBtLm5hbWU7XG4gICAgfVxufTtcblxuLyogVE9ET1xucHJvamVjdGluZm8uZ2l0ID0gZnVuY3Rpb24oKXtcblxufTtcblxucHJvamVjdGluZm8ubW9qbyA9IGZ1bmN0aW9uKCl7XG5cbn07XG4qL1xuXG5leHBvcnQgPSBwcm9qZWN0aW5mbzsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=

19
dist/projectinfo.npm.js vendored Normal file
View File

@ -0,0 +1,19 @@
/// <reference path="./typings/main.d.ts" />
var plugins = require("./projectinfo.plugins");
var ProjectinfoNPM = (function () {
function ProjectinfoNPM(cwdArg) {
this.packageJson = plugins.smartfile.readFileToObject(plugins.path.join(plugins.path.resolve(cwdArg), "package.json"));
this.name = this.packageJson.name;
this.version = this.packageJson.version;
this.status = "ok";
this.license = this.packageJson.license;
if (this.packageJson.repository) {
this.git = plugins.smartstring.git(this.packageJson.repository.url);
}
;
}
return ProjectinfoNPM;
})();
module.exports = ProjectinfoNPM;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByb2plY3RpbmZvLm5wbS50cyJdLCJuYW1lcyI6WyJQcm9qZWN0aW5mb05QTSIsIlByb2plY3RpbmZvTlBNLmNvbnN0cnVjdG9yIl0sIm1hcHBpbmdzIjoiQUFBQSw0Q0FBNEM7QUFDNUMsSUFBTyxPQUFPLFdBQVcsdUJBQXVCLENBQUMsQ0FBQztBQUNsRDtJQVFJQSx3QkFBWUEsTUFBYUE7UUFDckJDLElBQUlBLENBQUNBLFdBQVdBLEdBQUdBLE9BQU9BLENBQUNBLFNBQVNBLENBQUNBLGdCQUFnQkEsQ0FDakRBLE9BQU9BLENBQUNBLElBQUlBLENBQUNBLElBQUlBLENBQ2JBLE9BQU9BLENBQUNBLElBQUlBLENBQUNBLE9BQU9BLENBQUNBLE1BQU1BLENBQUNBLEVBQzVCQSxjQUFjQSxDQUNqQkEsQ0FDSkEsQ0FBQ0E7UUFDRkEsSUFBSUEsQ0FBQ0EsSUFBSUEsR0FBR0EsSUFBSUEsQ0FBQ0EsV0FBV0EsQ0FBQ0EsSUFBSUEsQ0FBQ0E7UUFDbENBLElBQUlBLENBQUNBLE9BQU9BLEdBQUdBLElBQUlBLENBQUNBLFdBQVdBLENBQUNBLE9BQU9BLENBQUNBO1FBQ3hDQSxJQUFJQSxDQUFDQSxNQUFNQSxHQUFHQSxJQUFJQSxDQUFDQTtRQUNuQkEsSUFBSUEsQ0FBQ0EsT0FBT0EsR0FBR0EsSUFBSUEsQ0FBQ0EsV0FBV0EsQ0FBQ0EsT0FBT0EsQ0FBQ0E7UUFDeENBLEVBQUVBLENBQUNBLENBQUNBLElBQUlBLENBQUNBLFdBQVdBLENBQUNBLFVBQVVBLENBQUNBLENBQUFBLENBQUNBO1lBQzdCQSxJ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ZlcnNpb247XG4gICAgICAgIHRoaXMuc3RhdHVzID0gXCJva1wiO1xuICAgICAgICB0aGlzLmxpY2Vuc2UgPSB0aGlzLnBhY2thZ2VKc29uLmxpY2Vuc2U7XG4gICAgICAgIGlmICh0aGlzLnBhY2thZ2VKc29uLnJlcG9zaXRvcnkpe1xuICAgICAgICAgICAgdGhpcy5naXQgPSBwbHVnaW5zLnNtYXJ0c3RyaW5nLmdpdCh0aGlzLnBhY2thZ2VKc29uLnJlcG9zaXRvcnkudXJsKTtcbiAgICAgICAgfTtcblxuICAgIH1cbn1cblxuZXhwb3J0ID0gUHJvamVjdGluZm9OUE07Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9

10
dist/projectinfo.plugins.js vendored Normal file
View File

@ -0,0 +1,10 @@
/// <reference path="./typings/main.d.ts" />
var plugins = {
path: require("path"),
Q: require("q"),
smartfile: require("smartfile"),
smartstring: require("smartstring")
};
module.exports = plugins;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInByb2plY3RpbmZvLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsNENBQTRDO0FBQzVDLElBQUksT0FBTyxHQUFHO0lBQ1YsSUFBSSxFQUFFLE9BQU8sQ0FBQyxNQUFNLENBQUM7SUFDckIsQ0FBQyxFQUFFLE9BQU8sQ0FBQyxHQUFHLENBQUM7SUFDZixTQUFTLEVBQUUsT0FBTyxDQUFDLFdBQVcsQ0FBQztJQUMvQixXQUFXLEVBQUUsT0FBTyxDQUFDLGFBQWEsQ0FBQztDQUN0QyxDQUFDO0FBRUYsaUJBQVMsT0FBTyxDQUFDIiwiZmlsZSI6InByb2plY3RpbmZvLnBsdWdpbnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XG52YXIgcGx1Z2lucyA9IHtcbiAgICBwYXRoOiByZXF1aXJlKFwicGF0aFwiKSxcbiAgICBROiByZXF1aXJlKFwicVwiKSxcbiAgICBzbWFydGZpbGU6IHJlcXVpcmUoXCJzbWFydGZpbGVcIiksXG4gICAgc21hcnRzdHJpbmc6IHJlcXVpcmUoXCJzbWFydHN0cmluZ1wiKVxufTtcblxuZXhwb3J0ID0gcGx1Z2luczsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=

View File

@ -1,28 +0,0 @@
{
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "projectinfo",
"description": "A tool for gathering project information, supporting npm, git, and more.",
"npmPackagename": "@push.rocks/projectinfo",
"license": "MIT",
"keywords": [
"project-info",
"npm",
"git",
"typescript",
"package-info",
"repository"
]
}
},
"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"
}
}

View File

@ -1,60 +1,35 @@
{ {
"name": "@push.rocks/projectinfo", "name": "projectinfo",
"version": "5.0.2", "version": "1.0.0",
"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/index.js",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(npmts)"
"build": "(tsbuild --web --allowimplicitany)",
"buildDocs": "tsdoc"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://code.foss.global/push.rocks/projectinfo.git" "url": "git+https://github.com/pushrocks/projectinfo.git"
}, },
"keywords": [ "keywords": [
"project-info", "project",
"npm", "npm",
"git", "git",
"typescript", "info",
"package-info", "package"
"repository"
], ],
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"bugs": { "bugs": {
"url": "https://gitlab.com/pushrocks/projectinfo/issues" "url": "https://github.com/pushrocks/projectinfo/issues"
}, },
"homepage": "https://code.foss.global/push.rocks/projectinfo", "homepage": "https://github.com/pushrocks/projectinfo#readme",
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^2.1.66", "npmts": "^3.1.2",
"@git.zone/tsrun": "^1.2.44", "should": "^8.2.2"
"@git.zone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.12",
"@types/node": "^20.4.8"
}, },
"dependencies": { "dependencies": {
"@push.rocks/smartfile": "^10.0.28", "q": "^1.4.1",
"@push.rocks/smartpath": "^5.0.11", "smartfile": "0.0.11",
"@push.rocks/smartpromise": "^4.0.3", "smartstring": "0.0.2"
"@push.rocks/smartstring": "^4.0.2" }
}, }
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"browserslist": [
"last 1 chrome versions"
]
}

4804
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@

103
readme.md
View File

@ -1,103 +0,0 @@
# @push.rocks/projectinfo
gather information about projects. supports npm, git etc.
## Install
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:
```bash
npm install @push.rocks/projectinfo --save
```
This will add it to your project's `package.json` file and download the package into the `node_modules` folder.
## Usage
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.
### Setup
First, make sure to import `ProjectInfo` from the package in your TypeScript file. Here's how to get started:
```typescript
import { ProjectInfo } from '@push.rocks/projectinfo';
```
### Gathering NPM Information
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.
```typescript
const projectInfo = new ProjectInfo('./path/to/your/project');
console.log(`Project Name: ${projectInfo.npm.name}`);
console.log(`Project Version: ${projectInfo.npm.version}`);
```
This example assumes that your current working directory (`cwd`) is set correctly relative to your project. Adjust `'./path/to/your/project'` as necessary.
### 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.

View File

@ -2,7 +2,6 @@
"name": "testpackage", "name": "testpackage",
"version": "1.0.0", "version": "1.0.0",
"description": "some test", "description": "some test",
"type": "module",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/someuser/somerepo.git" "url": "git+https://github.com/someuser/somerepo.git"

40
test/test.js Normal file
View File

@ -0,0 +1,40 @@
/// <reference path="../ts/typings/main.d.ts" />
var projectinfo = require("../dist/index.js");
var should = require("should");
var path = require("path");
var testBasePath = path.resolve(__dirname);
describe("projectinfo", function () {
describe(".npm() return", function () {
var myNpm = projectinfo.npm(testBasePath);
it("should have .packageJson", function () {
myNpm.packageJson
.should.have.property("version", "1.0.0");
myNpm.packageJson
.should.have.property("name", "testpackage");
});
it("should have .version", function () {
myNpm
.should.have.property("version", "1.0.0");
});
it("should have .name", function () {
myNpm
.should.have.property("name", "testpackage");
});
it("should have .license", function () {
myNpm
.should.have.property("license", "MIT");
});
it("should have .git", function () {
myNpm.git.httpsUrl
.should.equal("https://github.com/someuser/somerepo.git");
});
});
describe(".getName()", function () {
it("should return a name", function () {
projectinfo.getName(testBasePath)
.should.equal("testpackage");
});
});
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsZ0RBQWdEO0FBQ2hELElBQUksV0FBVyxHQUFHLE9BQU8sQ0FBQyxrQkFBa0IsQ0FBQyxDQUFDO0FBQzlDLElBQUksTUFBTSxHQUFHLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQztBQUMvQixJQUFJLElBQUksR0FBRyxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDM0IsSUFBSSxZQUFZLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztBQUUzQyxRQUFRLENBQUMsYUFBYSxFQUFDO0lBQ25CLFFBQVEsQ0FBQyxlQUFlLEVBQUM7UUFDckIsSUFBSSxLQUFLLEdBQUcsV0FBVyxDQUFDLEdBQUcsQ0FBQyxZQU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Z1bmN0aW9uKCl7XG4gICAgICAgICAgICBteU5wbVxuICAgICAgICAgICAgICAgIC5zaG91bGQuaGF2ZS5wcm9wZXJ0eShcInZlcnNpb25cIixcIjEuMC4wXCIpXG4gICAgICAgIH0pO1xuXG4gICAgICAgIGl0KFwic2hvdWxkIGhhdmUgLm5hbWVcIixmdW5jdGlvbigpe1xuICAgICAgICAgICAgbXlOcG1cbiAgICAgICAgICAgICAgICAuc2hvdWxkLmhhdmUucHJvcGVydHkoXCJuYW1lXCIsXCJ0ZXN0cGFja2FnZVwiKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgaXQoXCJzaG91bGQgaGF2ZSAubGljZW5zZVwiLGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICBteU5wbVxuICAgICAgICAgICAgICAgIC5zaG91bGQuaGF2ZS5wcm9wZXJ0eShcImxpY2Vuc2VcIixcIk1JVFwiKTtcbiAgICAgICAgfSk7XG4gICAgICAgIGl0KFwic2hvdWxkIGhhdmUgLmdpdFwiLGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICBteU5wbS5naXQuaHR0cHNVcmxcbiAgICAgICAgICAgICAgICAuc2hvdWxkLmVxdWFsKFwiaHR0cHM6Ly9naXRodWIuY29tL3NvbWV1c2VyL3NvbWVyZXBvLmdpdFwiKTtcbiAgICAgICAgfSk7XG5cbiAgICB9KTtcblxuICAgIGRlc2NyaWJlKFwiLmdldE5hbWUoKVwiLGZ1bmN0aW9uKCl7XG4gICAgICAgIGl0KFwic2hvdWxkIHJldHVybiBhIG5hbWVcIixmdW5jdGlvbigpe1xuICAgICAgICAgICAgcHJvamVjdGluZm8uZ2V0TmFtZSh0ZXN0QmFzZVBhdGgpXG4gICAgICAgICAgICAgICAgLnNob3VsZC5lcXVhbChcInRlc3RwYWNrYWdlXCIpO1xuICAgICAgICB9KTtcbiAgICB9KVxufSk7Il0sInNvdXJjZVJvb3QiOiIvc291cmNlLyJ9

1
test/test.js.map Normal file
View File

@ -0,0 +1 @@
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C;QAClE,CAAC,CAAC,CAAC;IAEP,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,YAAY,EAAC;QAClB,EAAE,CAAC,sBAAsB,EAAC;YACtB,WAAW,CAAC,OAAO,CAAC,YAAY,CAAC;iBAC5B,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAC"}

View File

@ -1,32 +1,44 @@
import { tap, expect } from '@push.rocks/tapbundle'; /// <reference path="../ts/typings/main.d.ts" />
import * as smartpath from '@push.rocks/smartpath'; var projectinfo = require("../dist/index.js");
import * as projectinfo from '../ts/index.js'; var should = require("should");
var path = require("path");
var testBasePath = path.resolve(__dirname);
import * as path from 'path'; describe("projectinfo",function(){
let testBasePath = path.resolve(smartpath.get.dirnameFromImportMetaUrl(import.meta.url)); describe(".npm() return",function(){
var myNpm = projectinfo.npm(testBasePath);
it("should have .packageJson",function(){
myNpm.packageJson
.should.have.property("version","1.0.0");
myNpm.packageJson
.should.have.property("name","testpackage");
});
let myNpm = new projectinfo.ProjectinfoNpm(testBasePath, { gitAccessToken: 'sometoken' }); it("should have .version",function(){
tap.test('should have .packageJson', async () => { myNpm
expect(myNpm.packageJson).property('version').toEqual('1.0.0'); .should.have.property("version","1.0.0")
expect(myNpm.packageJson).property('name').toEqual('testpackage'); });
});
tap.test('should have .version', async () => { it("should have .name",function(){
expect(myNpm).property('version').toEqual('1.0.0'); myNpm
}); .should.have.property("name","testpackage");
});
tap.test('should have .name', async () => { it("should have .license",function(){
expect(myNpm).property('name').toEqual('testpackage'); myNpm
}); .should.have.property("license","MIT");
});
it("should have .git",function(){
myNpm.git.httpsUrl
.should.equal("https://github.com/someuser/somerepo.git");
});
tap.test('should have .license', async () => { });
expect(myNpm).property('license').toEqual('MIT');
});
tap.test('should have .git', async () => {
expect(myNpm.git.httpsUrl).toEqual('https://sometoken@github.com/someuser/somerepo.git');
});
tap.test('should return a name', async () => {
expect(projectinfo.getNpmNameForDir(testBasePath)).toEqual('testpackage');
});
tap.start(); describe(".getName()",function(){
it("should return a name",function(){
projectinfo.getName(testBasePath)
.should.equal("testpackage");
});
})
});

View File

@ -1,8 +0,0 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@push.rocks/projectinfo',
version: '5.0.2',
description: 'gather information about projects. supports npm, git etc.'
}

View File

@ -1,21 +1,29 @@
import * as plugins from './projectinfo.plugins.js'; /// <reference path="./typings/main.d.ts" />
import plugins = require("./projectinfo.plugins");
var projectinfo:any = {};
// direct access to classes //classes
export * from './projectinfo.classes.git.js'; import ProjectinfoNPM = require("./projectinfo.npm");
export * from './projectinfo.classes.npm.js'; projectinfo.npm = function(cwdArg){
export * from './projectinfo.classes.projectinfo.js'; return new ProjectinfoNPM(cwdArg);
// npm
import { ProjectinfoNpm } from './projectinfo.classes.npm.js';
// quick functions
/**
* gets the name from package.json in a specified directory
*/
export let getNpmNameForDir = function (cwdArg) {
let localNpm = new ProjectinfoNpm(cwdArg);
if (localNpm.status === 'ok') {
return localNpm.name;
}
}; };
//quick functions
projectinfo.getName = function(cwdArg){
var localNpm = projectinfo.npm(cwdArg);
if (localNpm.status === "ok"){
return localNpm.name;
}
};
/* TODO
projectinfo.git = function(){
};
projectinfo.mojo = function(){
};
*/
export = projectinfo;

View File

@ -1,29 +0,0 @@
import * as plugins from './projectinfo.plugins.js';
export class ProjectinfoGit {
isGit: boolean;
githost: string;
gituser: string;
gitrepo: string;
cwd: string;
constructor(cwdArg: string) {
this.cwd = cwdArg;
this.getGitInfoFromPath();
}
/**
* get git info from path
*/
getGitInfoFromPath() {
let localSmartpath = new plugins.smartpath.Smartpath(this.cwd);
this.gitrepo = localSmartpath.pathLevelsBackwards[0];
this.gituser = localSmartpath.pathLevelsBackwards[1];
}
/**
* get git info from remote url
*/
getGitInfoFromRemote(remoteUrlArg: string) {
let gitRepoParsed = new plugins.smartstring.GitRepo(remoteUrlArg);
}
}

View File

@ -1,32 +0,0 @@
import * as plugins from './projectinfo.plugins.js';
export class ProjectinfoNpm {
isNpm: boolean = false;
packageJson: any;
name: string;
version: string;
status: string;
license: string;
git: plugins.smartstring.GitRepo;
constructor(cwdArg: string, optionsArg: { gitAccessToken?: string } = {}) {
let resolvedCwd = plugins.path.resolve(cwdArg);
if (plugins.smartfile.fs.fileExists(plugins.path.join(resolvedCwd, 'package.json'))) {
this.isNpm = true;
this.packageJson = plugins.smartfile.fs.toObjectSync(
plugins.path.join(resolvedCwd, 'package.json'),
'json'
);
this.name = this.packageJson.name;
this.version = this.packageJson.version;
this.status = 'ok';
this.license = this.packageJson.license;
if (this.packageJson.repository) {
this.git = new plugins.smartstring.GitRepo(
this.packageJson.repository.url,
optionsArg.gitAccessToken
);
}
}
}
}

View File

@ -1,20 +0,0 @@
import * as plugins from './projectinfo.plugins.js';
import { ProjectinfoNpm } from './projectinfo.classes.npm.js';
import { ProjectinfoGit } from './projectinfo.classes.git.js';
export type TProjectType = 'git' | 'npm';
/**
* class projectinfo automatically examines a given directory and exposes relevant info about it
*/
export class ProjectInfo {
type: TProjectType;
npm: ProjectinfoNpm;
git: ProjectinfoGit;
/**
* constructor of class ProjectInfo
*/
constructor(cwdArg: string) {
this.npm = new ProjectinfoNpm(cwdArg);
this.git = new ProjectinfoGit(cwdArg);
}
}

29
ts/projectinfo.npm.ts Normal file
View File

@ -0,0 +1,29 @@
/// <reference path="./typings/main.d.ts" />
import plugins = require("./projectinfo.plugins");
class ProjectinfoNPM {
packageJson;
name:string;
version:string;
status:string;
license:string;
git;
constructor(cwdArg:string){
this.packageJson = plugins.smartfile.readFileToObject(
plugins.path.join(
plugins.path.resolve(cwdArg),
"package.json"
)
);
this.name = this.packageJson.name;
this.version = this.packageJson.version;
this.status = "ok";
this.license = this.packageJson.license;
if (this.packageJson.repository){
this.git = plugins.smartstring.git(this.packageJson.repository.url);
};
}
}
export = ProjectinfoNPM;

View File

@ -1,7 +1,9 @@
import * as path from 'path'; /// <reference path="./typings/main.d.ts" />
import * as smartpromise from '@push.rocks/smartpromise'; var plugins = {
import * as smartfile from '@push.rocks/smartfile'; path: require("path"),
import * as smartstring from '@push.rocks/smartstring'; Q: require("q"),
import * as smartpath from '@push.rocks/smartpath'; smartfile: require("smartfile"),
smartstring: require("smartstring")
};
export { path, smartpromise, smartfile, smartstring, smartpath }; export = plugins;

7
ts/typings.json Normal file
View File

@ -0,0 +1,7 @@
{
"ambientDependencies": {
"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts",
"mocha": "github:Bartvds/tsd-deftools/typings/DefinitelyTyped/mocha/mocha.d.ts",
"colors": "github:DefinitelyTyped/DefinitelyTyped/colors/colors.d.ts"
}
}

View File

@ -1,14 +0,0 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}