-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add devcontainer and codespaces support - Fix platyps bug, see PowerShell/platyPS#595 - Update function .md files - Update issue templates - Update first .LINK in all CBH to repo url update devcontainer.json update devcontainer.json update comments in bootstrap.ps1 Fix platyps bug, see PowerShell/platyPS#595 test codespaces Update first .LINK in all CBH to repo url Update .md files update readme.md Update readme and add new issue template
- Loading branch information
1 parent
19737a2
commit e82c9ce
Showing
38 changed files
with
427 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu | ||
# https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu?view=powershell-7.4 | ||
COPY bootstrap.ps1 bootstrap.ps1 | ||
RUN apt-get update \ | ||
&& apt-get install -y wget apt-transport-https software-properties-common \ | ||
&& wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb \ | ||
&& dpkg -i packages-microsoft-prod.deb \ | ||
&& rm packages-microsoft-prod.deb \ | ||
&& apt-get update \ | ||
&& apt-get install -y powershell \ | ||
&& pwsh -File bootstrap.ps1 | ||
COPY profile.ps1 /opt/microsoft/powershell/7/profile.ps1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.psresourceget/install-psresource?view=powershellget-3.x | ||
# https://devblogs.microsoft.com/powershell/psresourceget-is-generally-available/ | ||
# https://github.com/PowerShell/PSResourceGet | ||
# https://hub.docker.com/_/microsoft-powershell | ||
# https://devblogs.microsoft.com/powershell/powershellget-in-powershell-7-4-updates/ | ||
# http://dahlbyk.github.io/posh-git/ | ||
# https://code.visualstudio.com/remote/advancedcontainers/change-default-source-mount | ||
# https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.psresourceget/?view=powershellget-3.x | ||
# https://code.visualstudio.com/docs/devcontainers/containers#_container-specific-settings | ||
$ErrorActionPreference = 'Stop' | ||
Install-PSResource -TrustRepository -Scope AllUsers -RequiredResource @{ | ||
'Microsoft.PowerShell.PSResourceGet' = @{ | ||
version = '1.0.2' | ||
repository = 'PSGallery' | ||
} | ||
'Pester' = @{ | ||
version = '5.4.0' | ||
repository = 'PSGallery' | ||
} | ||
'InvokeBuild' = @{ | ||
version = '5.10.2' | ||
repository = 'PSGallery' | ||
} | ||
'PSScriptAnalyzer' = @{ | ||
version = '1.21.0' | ||
repository = 'PSGallery' | ||
} | ||
'platyPS' = @{ | ||
version = '0.12.0' | ||
repository = 'PSGallery' | ||
} | ||
'posh-git' = @{ | ||
version = '1.1.0' | ||
repository = 'PSGallery' | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/powershell | ||
{ | ||
"name": "PowerShell", | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
// Configure properties specific to VS Code. | ||
"vscode": { | ||
// Set *default* container specific settings.json values on container create. | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "pwsh" | ||
}, | ||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"ms-vscode.PowerShell", | ||
"ms-vscode-remote.remote-containers", | ||
"ryanluker.vscode-coverage-gutters", | ||
"DavidAnson.vscode-markdownlint", | ||
"eriklynd.json-tools", | ||
"redhat.vscode-xml", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Write-Host 'Loading profile...' -ForegroundColor Cyan | ||
Import-Module posh-git | ||
# PSReadline | ||
Set-PSReadLineOption -PredictionSource History | ||
Set-PSReadLineOption -Colors @{ InlinePrediction = '#2F7004' } #green | ||
Set-PSReadLineOption -PredictionViewStyle ListView #you may prefer InlineView | ||
# Custom prompt function | ||
function prompt { | ||
<# | ||
.SYNOPSIS | ||
Custom prompt function. | ||
.EXAMPLE | ||
[2022-JUL-30 21:18][..project-starters\aws\aws-backup-automation][main ≡] | ||
>> | ||
#> | ||
$global:promptDateTime = [datetime]::Now | ||
$Global:promptDate = $global:promptDateTime.ToString('yyyy-MMM-dd').ToUpper() | ||
$Global:promptTime = $global:promptDateTime.ToString('HH:mm') | ||
# truncate the current location if too long | ||
$currentDirectory = $executionContext.SessionState.Path.CurrentLocation.Path | ||
$consoleWidth = [Console]::WindowWidth | ||
$maxPath = [int]($consoleWidth / 4.5) | ||
if ($currentDirectory.Length -gt $maxPath) { | ||
$currentDirectory = '..' + $currentDirectory.SubString($currentDirectory.Length - $maxPath) | ||
} | ||
$global:promptPath = $currentDirectory | ||
|
||
$InGitRepo = Write-VcsStatus | ||
if ($InGitRepo) { | ||
Write-Host "[$global:promptDate $global:promptTime]" -ForegroundColor Green -NoNewline | ||
Write-Host "[$global:promptPath]" -ForegroundColor Magenta -NoNewline | ||
Write-Host $InGitRepo.Trim() -NoNewline | ||
"`r`n>>" | ||
} | ||
else { | ||
Write-Host "[$global:promptDate $global:promptTime]" -ForegroundColor Green -NoNewline | ||
Write-Host "[$global:promptPath]" -ForegroundColor Magenta -NoNewline | ||
"`r`n>>" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# https://code.visualstudio.com/docs/devcontainers/tips-and-tricks#_resolving-git-line-ending-issues-in-containers-resulting-in-many-modified-files | ||
* text=auto eol=lf | ||
*.{cmd,[cC][mM][dD]} text eol=crlf | ||
*.{bat,[bB][aA][tT]} text eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Add API support | ||
about: Request implementation of specific endpoints from https://developers.cloudflare.com/api/ | ||
title: Add support for [ENDPOINTS] | ||
labels: enhancement, good first issue | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Description | ||
<!--- Describe the desired implementation and list links to relevant docs. Example: | ||
I want to be able to list my accounts, view details of accounts and update accounts. | ||
- https://developers.cloudflare.com/api/operations/accounts-list-accounts | ||
- https://developers.cloudflare.com/api/operations/accounts-account-details | ||
- https://developers.cloudflare.com/api/operations/accounts-update-account | ||
--> | ||
|
||
### Requirements | ||
<!--- | ||
List the functions, tests and types that need to be added and create issues for future work if needed. | ||
Example: | ||
- Get-CFAccount.ps1 | ||
- Get-CFAccount.Tests.ps1 | ||
- Cloudflare.Account.Types.ps1xml | ||
- Create new issue for implementation of Update-CFAccount.ps1 and Update-CFAccount.Tests.ps1 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
.github/ISSUE_TEMPLATE/feature_request.md → ...ISSUE_TEMPLATE/generic-feature-request.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Setup dev env | ||
about: Steps to set up developer environment | ||
title: [YOUR_NAME] dev env setup | ||
labels: good first issue | ||
assignees: '' | ||
|
||
--- | ||
|
||
```[tasklist] | ||
### To Do | ||
- [ ] TBD | ||
- [ ] TBD | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"ms-vscode.PowerShell", | ||
"ryanluker.vscode-coverage-gutters", | ||
"DavidAnson.vscode-markdownlint" | ||
] | ||
} | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": [ | ||
"ms-vscode.PowerShell", | ||
"ms-vscode-remote.remote-containers", | ||
"ryanluker.vscode-coverage-gutters", | ||
"DavidAnson.vscode-markdownlint", | ||
"eriklynd.json-tools", | ||
"redhat.vscode-xml", | ||
"ms-azuretools.vscode-docker" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.