Skip to content

Commit

Permalink
feat: Adding Transform Command Type (Fixes #579)
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Nov 11, 2023
1 parent 5471e84 commit ba905be
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions PipeScript.ps.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,36 @@
)
'
}

'Transform' = @{
Description = 'Transforms'
Pattern = '
(?>
# Transforms have two forms, one that is very "query" friendly
\=\> # =>
(?<TransformName>[^\p{Ps}\<]+)? # Optional transform name
[\p{Ps}\<] # Transform From Type Start
(?<TransformFrom>[^\p{Pe}\>]+) # TransformFrom
[^\p{Pe}\>] # Transform From Type End
(?:
\=\> # =>
(?<TransformToName>[^\p{Ps}\<]+)? # Optional to name
[\p{Ps}\<] # Transform To Type Start
(?<TransformTo>[^\p{Pe}\>]+) # Transform To
[^\p{Pe}\>] # Transform To Type End
)?
|
# The other form is fairly normal:
Transform(?>s|er)? # Transform or Transforms or Transformer
(?>
\.ps1$ # ending with .ps1
| # or
\p{P} # followed by punctuation
)
)
'
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
}

'Template' =
@{
Expand Down

0 comments on commit ba905be

Please sign in to comment.