Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Report a reproducible issue in PowerScp
title: ""
labels: bug
assignees: ""
---

## Summary

Describe the bug clearly and concisely.

## Steps to reproduce

1. Import the module
2. Run the command or script
3. Observe the incorrect behavior

## Expected behavior

What you expected to happen.

## Actual behavior

What happened instead.

## Environment

- OS:
- PowerShell version:
- Module version / commit:
- Command or workflow involved:

## Logs or output

Paste any relevant output, redacted logs, or error messages.

## Additional context

Add screenshots, sample paths, or notes that help explain the issue.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Project discussion
url: https://github.com/PsCustomObject/PowerScp/discussions
about: Ask general questions or discuss ideas outside of a bug or feature report.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Feature request
about: Suggest an enhancement or new capability for PowerScp
title: ""
labels: enhancement
assignees: ""
---

## Suggested enhancement

Describe the feature or improvement you would like to see.

## Why this would help

Explain the problem it solves or the workflow it improves.

## Proposed behavior

Describe the intended command, parameter, or workflow.

## Compatibility considerations

Note any impact on PowerShell versions, WinSCP compatibility, or existing transfer behavior.

## Examples

Provide sample usage or expected results if relevant.
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Summary

Describe the change and the problem it solves.

## Scope

- What changed
- Why the change was needed
- Any compatibility or migration considerations

## Validation

- [ ] Relevant tests run
- [ ] Module imports successfully
- [ ] Documentation updated where needed
- [ ] No unrelated files changed

## Notes

Add any additional context, concerns, or follow-up work here.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: PowerShell tests
on: [push, pull_request]
env:
POWERSHELL_TELEMETRY_OPTOUT: '1'
POWERSHELL_UPDATECHECK: 'Off'
permissions:
contents: read
jobs:
Expand All @@ -21,4 +24,6 @@ jobs:
}
Install-Module Pester -RequiredVersion 5.7.1 -Force -Scope CurrentUser -SkipPublisherCheck
Import-Module Pester -RequiredVersion 5.7.1
Install-Module PSScriptAnalyzer -RequiredVersion 1.24.0 -Force -Scope CurrentUser
./scripts/Test-StaticAnalysis.ps1
Invoke-Pester ./tests -CI -Output Detailed
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# PowerScp change history

## 1.2.1 - 2026-10-05

- Split public commands and private helpers into individual files, preserving the command interface and session lifecycle.

- Treat rename destinations as exact names and reject existing directories.
- Preserve forced replacement targets in sibling backups; restore on failure when safe, otherwise report recovery paths.
- Reject directory-over-file replacement and directory sources for download renaming.
- Validate renamed downloads against Windows filename rules.
- Require Binary mode for content writes to preserve exact bytes.
- Dispose tracked sessions when the module is removed or force-reimported.
- Expand command help, regression tests, static analysis and opt-in live SFTP coverage.

## 1.2.0 - 2026-10-05

- Compare practical features against the WinSCP 6.3.6.0 Gallery package and document command mappings and deliberate differences.
Expand Down
102 changes: 102 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Contributing to PowerScp

Thanks for your interest in improving PowerScp.

This project is a PowerShell module built around practical file-transfer automation. Contributions should keep the project focused on secure, readable, and reliable remote file operations without unnecessary scope expansion.

## Project scope

Please keep changes aligned with the module’s purpose:

- PowerShell 5.1 and PowerShell 7 compatibility where appropriate
- WinSCP-backed transfer operations for common remote file workflows
- secure session handling and explicit connection validation
- clear, maintainable scripting behavior that helps automation teams work faster and more safely

Avoid unrelated feature drift or large rewrites that move the project away from its core transfer-focused purpose.

## Repository structure

- `PowerScp.psd1` and `PowerScp.psm1` contain the module manifest and exported functionality.
- `docs/` contains design notes, reviews and testing guidance.
- `bin/` contains bundled WinSCP assets.
- `tests/` contains the project test suite.
- `scripts/` contains repository support scripts.
- `Staging/` contains staged or transitional work.

## Development setup

Requirements:

- PowerShell 5.1 or PowerShell 7
- WinSCP assembly dependencies bundled with the repo
- Pester 5.7.1 or later for test execution

Typical workflow:

```powershell
Import-Module Pester -RequiredVersion 5.7.1
Import-Module ./PowerScp.psd1 -Force -ErrorAction Stop
Invoke-Pester ./tests
```

## Contribution workflow

1. Create a focused branch for the work.
2. Keep changes scoped to one improvement or fix.
3. Preserve existing behavior unless the change intentionally updates documented semantics.
4. Validate the relevant tests and import behavior.
5. Update documentation when usage or compatibility changes.

## Coding expectations

- Prefer explicit, readable PowerShell over clever shortcuts.
- Keep session, connection and transfer behavior easy to reason about.
- Preserve secure defaults and validation-first patterns.
- Avoid silently swallowing operational failures.
- Add comments only when they clarify intent or non-obvious logic.
- Keep public cmdlet behavior predictable and consistent with the rest of the module.

## Testing

Run the project tests before submitting changes:

```powershell
Invoke-Pester ./tests
```

If a change affects transfer logic, session handling, protocol behavior, path validation or security-sensitive workflows, add or update tests wherever practical.

## Pull requests

Keep pull requests focused and specific.

Please include:

- a short summary of the change
- the reason it was needed
- any compatibility or migration impact
- validation performed

## Reporting bugs

When filing an issue, include:

- the command or script that failed
- expected behavior
- actual behavior
- operating system and PowerShell version
- repository commit or branch
- redacted sample input and output if relevant

## Security and sensitive issues

For security-sensitive issues, do not open a public issue. See [SECURITY.md](./SECURITY.md) for the appropriate reporting path.

## Documentation

If a change affects usage, protocol behavior, compatibility, or security assumptions, update the relevant documentation in the repo.

## License

By contributing, you agree that your contributions will be licensed under the project’s MIT license.
2 changes: 1 addition & 1 deletion PowerScp.psd1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@{
RootModule = 'PowerScp.psm1'
ModuleVersion = '1.2.0'
ModuleVersion = '1.2.1'
GUID = '3c42657a-e9fa-4358-a934-170727493e6c'
Author = 'PsCustomObject - Daniele Catanesi'
CompanyName = 'https://PsCustomObject.github.io'
Expand Down
Loading