Skip to content

Commit 8436914

Browse files
authored
Merge pull request #1 from Tirsvad/main
Initial
2 parents 4a7f06b + 9c063c2 commit 8436914

File tree

14 files changed

+496
-1
lines changed

14 files changed

+496
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,3 +416,4 @@ FodyWeavers.xsd
416416
*.msix
417417
*.msm
418418
*.msp
419+
/tests/test-results.xml

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
tirsvadweb@gamil.com.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

CONTRIBUTING.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Contributing to VSSolution Creation Script
2+
3+
Thank you for your interest in contributing! Your help is greatly appreciated.
4+
This document outlines the process for contributing to the project.
5+
6+
## Coding Guidelines
7+
8+
This project uses PowerShell for scripting. Follow these PowerShell-specific guidelines:
9+
10+
- Follow PowerShell best practices and the PowerShell Style Guidelines.
11+
- Use approved verbs for functions (see `Get-Verb`) and choose clear, descriptive function names.
12+
- Prefer advanced functions with `CmdletBinding()` so common parameters and `-Verbose`/`-Debug` are available.
13+
- Use strong typing and parameter validation attributes (`[Parameter()]`, `ValidateSet`, `ValidateNotNullOrEmpty`, etc.).
14+
- Support pipeline input for functions where appropriate and implement `Begin/Process/End` blocks when processing pipeline input.
15+
- Provide comment-based help for all public functions and scripts (examples, parameters, outputs).
16+
- Avoid aliases and use full cmdlet names in committed code (aliases are fine interactively).
17+
- Use `ShouldProcess`/`-WhatIf` for destructive operations and honor `-Confirm` when appropriate.
18+
- Use `Try/Catch` for error handling and throw or `Write-Error` as appropriate; prefer terminating errors when callers must act on failures.
19+
- Use `Write-Verbose`, `Write-Debug`, `Write-Warning`, and `Write-Error` for structured output and logging; do not write unstructured progress to stdout.
20+
- Keep formatting consistent (4-space indentation is recommended), avoid global variables, and keep functions focused and small.
21+
- Use `PSScriptAnalyzer` to lint scripts and address reported issues. Include a baseline or configuration if needed.
22+
- Organize modules with a `.psm1` and `.psd1` manifest; explicitly export public functions with `Export-ModuleMember`.
23+
- Write unit tests with `Pester` and place tests under a `tests/` folder. Run tests locally and in CI.
24+
- Avoid hard-coded credentials/secrets; use secure methods (secure strings, environment variables, or secret stores).
25+
- Use semantic versioning for modules and include a changelog for releases.
26+
27+
## How Can I Contribute?
28+
29+
### Reporting Bugs
30+
31+
- Open an issue on [GitHub Issues](https://github.com/TirsvadScript/PS.Logging/issues).
32+
- Use a clear and descriptive title.
33+
- Include steps to reproduce, expected and actual behavior, and environment details.
34+
35+
### Suggesting Enhancements
36+
37+
- Open an issue and label it as an enhancement.
38+
- Clearly describe the feature, why it would be useful, and any ideas for implementation.
39+
40+
### Pull Requests
41+
42+
1. **Fork the repository** and clone it locally.
43+
2. **Create a new branch** for your feature or fix
44+
```
45+
git checkout -b feature/YourFeatureName
46+
```
47+
48+
3. **Make your changes** with clear, concise commits.
49+
4. **Write or update tests** as needed.
50+
5. **Ensure all tests pass** before submitting.
51+
6. **Push to your fork** and submit a pull request to the `main` branch.
52+
7. **Describe your changes** in the pull request and reference any related issues.
53+
54+
### Code Style
55+
56+
- Follow the existing code style and conventions.
57+
- Use meaningful names and XML documentation where appropriate.
58+
- Keep methods and classes focused and concise.
59+
60+
### Commit Messages
61+
62+
- Use clear, descriptive commit messages.
63+
- Reference issues or pull requests when relevant.
64+
65+
## Code of Conduct
66+
67+
Please be respectful and considerate in all interactions.
68+
See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
69+
70+
## Questions?
71+
72+
Open an issue or contact the maintainer via [LinkedIn](https://www.linkedin.com/in/jens-tirsvad-nielsen-13b795b9/).
73+
74+
---
75+
Thank you for helping make TirsvadWeb.JwtAuth better!
File renamed without changes.

README.md

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,87 @@
1-
# PS.Logging
1+
[![downloads][downloads-shield]][downloads-url] [![Contributors][contributors-shield]][contributors-url] [![Forks][forks-shield]][forks-url] [![Stargazers][stars-shield]][stars-url] [![Issues][issues-shield]][issues-url] [![License][license-shield]][license-url] [![LinkedIn][linkedin-shield]][linkedin-url]
2+
3+
# ![Logo][Logo] Logging
4+
PowerShell Logging Module
5+
6+
## Overview
7+
PS.Logging is a PowerShell module designed to facilitate logging in PowerShell scripts and modules.
8+
It provides a simple and flexible way to log messages with different severity levels, making it easier to track and debug script execution.
9+
10+
## Features
11+
- Supports multiple log levels (e.g., Info, Warning, Error)
12+
- Easy integration with existing PowerShell scripts
13+
- Lightweight and fast
14+
15+
## Quick Start
16+
17+
### Download and Install
18+
To install the PS.Logging module, you can use the following PowerShell command:
19+
```powershell
20+
Install-Module -Name PS.Logging -Scope CurrentUser
21+
```
22+
#### Import the Module
23+
After installation, import the module into your PowerShell session:
24+
```powershell
25+
Import-Module PS.Logging
26+
```
27+
#### Basic Usage
28+
You can start logging messages using the `Write-Log` cmdlet. Here are some examples:
29+
```powershell
30+
Write-Header -Message "How to use Logging Examples"
31+
# Log an informational message
32+
Write-Info -Message "This is an informational message."
33+
# Log a warning message
34+
Write-Warn -Message "This is a warning message."
35+
# Log an error message
36+
Write-Err -Message "This is an error message."
37+
```
38+
39+
### Git Repository
40+
You can clone the repository using the following command:
41+
```powershell
42+
git clone https://github.com/TirsvadScript/PS.Logging.git
43+
```
44+
45+
## Testing
46+
The module includes a suite of Pester tests to ensure functionality and reliability. To run the tests, use the following command:
47+
```powershell
48+
try { powershell -NoProfile -NoLogo -Command "Import-Module Pester -ErrorAction SilentlyContinue; Invoke-Pester -Script .\logging.Tests.ps1 -OutputFormat NUnitXml -OutputFile test-results.xml" } finally { if ($?) { echo "bbb6c4dc03844c2986fd1ddfd0ceb545=$?" } else { echo "bbb6c4dc03844c2986fd1ddfd0ceb545=$?" } }
49+
```
50+
51+
## Contributing
52+
Contributions are welcome. Please follow the guidelines in `CONTRIBUTING.md` and open issues or pull requests.
53+
54+
See [CONTRIBUTING.md](CONTRIBUTING.md)
55+
56+
## Reporting Bugs
57+
1. Go to the Issues page: [GitHub Issues][githubIssue-url]
58+
2. Click "New Issue" and provide steps to reproduce, expected behavior, actual behavior, environment, and attachments (logs/screenshots).
59+
60+
## License
61+
Distributed under the AGPL-3.0 License. See [LICENSE.txt](LICENSE.txt) or [license link][license-url].
62+
63+
## Contact
64+
Jens Tirsvad Nielsen - [LinkedIn][linkedin-url]
65+
66+
## Acknowledgments
67+
Thanks to contributors and the open-source community.
68+
69+
<!-- MARKDOWN LINKS & IMAGES -->
70+
[contributors-shield]: https://img.shields.io/github/contributors/TirsvadScript/PS.Logging?style=for-the-badge
71+
[contributors-url]: https://github.com/TirsvadScript/PS.Logging/graphs/contributors
72+
[forks-shield]: https://img.shields.io/github/forks/TirsvadScript/PS.Logging?style=for-the-badge
73+
[forks-url]: https://github.com/TirsvadScript/PS.Logging/network/members
74+
[stars-shield]: https://img.shields.io/github/stars/TirsvadScript/PS.Logging?style=for-the-badge
75+
[stars-url]: https://github.com/TirsvadScript/PS.Logging/stargazers
76+
[issues-shield]: https://img.shields.io/github/issues/TirsvadScript/PS.Logging?style=for-the-badge
77+
[issues-url]: https://github.com/TirsvadScript/PS.Logging/issues
78+
[license-shield]: https://img.shields.io/github/license/TirsvadScript/PS.Logging?style=for-the-badge
79+
[license-url]: https://github.com/TirsvadScript/PS.Logging/blob/master/LICENSE.txt
80+
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
81+
[linkedin-url]: https://www.linkedin.com/in/jens-tirsvad-nielsen-13b795b9/
82+
[githubIssue-url]: https://github.com/TirsvadScript/PS.Logging/issues/
83+
[logo]: https://raw.githubusercontent.com/TirsvadScript/PS.Logging/main/images/logo/32x32/logo.png
84+
85+
86+
[downloads-shield]: https://img.shields.io/github/downloads/TirsvadScript/PS.Logging/total?style=for-the-badge
87+
[downloads-url]: https://github.com/TirsvadScript/PS.Logging/releases

SECURITY.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
This project is a collection of PowerShell scripts.
6+
We aim to support the latest PowerShell7.x and Windows PowerShell5.1 runtimes.
7+
Security fixes will be applied to the `main` branch and released as soon as practical.
8+
9+
| Version | Supported |
10+
| ------- | ------------------ |
11+
| 1.0.x | :white_check_mark: |
12+
| 0.1.x | :x: |
13+
14+
15+
## Reporting a Vulnerability
16+
17+
If you discover a security vulnerability, please report it privately so we can investigate and fix it before public disclosure.
18+
19+
Preferred reporting methods:
20+
21+
- Use GitHub's Security Advisories for this repository (recommended) so the maintainers can coordinate a fix and private disclosure. See: https://docs.github.com/en/code-security/security-advisories
22+
- If GitHub Security Advisories are not available for you, open a private communication to the repository maintainers (for example an email to the project maintainer) if such contact is published in the repository. Do not post security-sensitive information in public issues or PRs.
23+
24+
If you must use a public channel initially, avoid including exploit code or detailed reproduction steps until a private channel is established.
25+
26+
## What to Include in a Report
27+
28+
Please include as much of the following as possible:
29+
30+
- A clear description of the vulnerability and its impact (confidentiality, integrity, availability).
31+
- Step-by-step reproduction steps or a minimal proof-of-concept (in a private channel only).
32+
- Affected versions/files and the environment where the issue was observed (PowerShell version, OS).
33+
- Any relevant logs, stack traces or configuration snippets.
34+
- Contact information so the maintainers can follow up.
35+
36+
## Response Process and Timeline
37+
38+
- Acknowledgement: We will acknowledge receipt as soon as practicable.
39+
- Triage: We will triage and begin an investigation as soon as practicable.
40+
- Fix: We will work to provide a fix or mitigation as soon as practicable; timelines vary by severity and complexity.
41+
- Public disclosure: The project follows coordinated disclosure practices. We will coordinate any public disclosure with the reporter; if no agreement is reached, we may disclose after a reasonable period once a fix is available.
42+
43+
## Disclosure Policy
44+
45+
We prefer coordinated disclosure so that users can update safely.
46+
Please do not publicly disclose vulnerabilities until a maintainer has had a reasonable opportunity to respond and a fix is available.
47+
48+
## Credits
49+
50+
We appreciate security reports and will credit reporters in release notes or acknowledgements unless the reporter requests to remain anonymous.
51+
52+
---
53+
54+
If you have questions about this policy or need an alternate contact method, open an issue marked with the `security` label (avoid posting exploit details) or check the repository README for maintainer contact information.

images/logo/128x128/logo.ico

50.1 KB
Binary file not shown.

images/logo/128x128/logo.png

20.5 KB
Loading

images/logo/32x32/logo.png

2.2 KB
Loading

images/logo/64x64/logo.png

6.71 KB
Loading

0 commit comments

Comments
 (0)