Skip to content

Commit 31fc171

Browse files
Merge pull request #295 from StartAutomating/PipeScriptTemplatesAndOtherTools
PipeScript 0.2
2 parents 5ebf403 + 4518044 commit 31fc171

File tree

111 files changed

+6896
-974
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+6896
-974
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 0.2:
2+
3+
* Massive Improvements in Templating
4+
* Templates can be used interactively (Fixes #285)
5+
* Renaming all Inline Transpilers to Template Transpilers
6+
* Natural Parsing Improvements
7+
* ArrayLiterals are expanded (Fixes #291)
8+
* AsSentence now only allows one value into a singleton (Fixes #279)
9+
* Not expanding expandable strings (Fixes #286)
10+
* Transpilers can change nearby context (Fixes #292)
11+
* Allowing dot syntax to extend across multiple statements (Fixes #273)
12+
* Adding requires keyword (Fixes #293)
13+
* PipeScript modifies its own manifest (Fixes #294)
14+
15+
---
16+
117
## 0.1.9:
218
* Protocol Transpilers
319
* Adding JSONSchema transpiler (Fixes #274)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Write-FormatView -TypeName PipeScript.Template -Property Name, Template -GroupByProperty Language -Wrap

Join-PipeScript.ps1

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,21 +388,27 @@ function Join-PipeScript
388388
if ($block.Unnamed -and -not $blockOpen) {
389389
' ' * ($block | MeasureIndent) + 'end {'
390390
$blockOpen = $true
391+
$closeEndBlock = $true
391392
}
392393
if ($StatementsToAdd) {
393394
$StatementsToAdd -join [Environment]::NewLine
394395
$StatementsToAdd = $null
395396
}
396-
$block.Extent.ToString() -replace '^end\s{0,}\{' -replace '\}$' -replace '^param\(\)[\s\r\n]{0,}'
397+
if ($block.Unnamed) {
398+
$block.Extent.ToString()
399+
} else {
400+
$block.Extent.ToString() -replace '^end\s{0,}\{' -replace '\}$' -replace '^param\(\)[\s\r\n]{0,}'
401+
}
397402
}
398403
}
399404

400405
if ($StatementsToAdd) {
401406
if ($closeEndBlock -and -not $blockOpen) {
402407
'end {'
408+
$blockOpen = $true
403409
}
404410
$StatementsToAdd -join [Environment]::NewLine
405-
$StatementsToAdd = $null
411+
$StatementsToAdd = $null
406412
}
407413

408414
# If we need to close the end block, and it is open,

ListOfTranspilers.md

Lines changed: 86 additions & 84 deletions
Large diffs are not rendered by default.

PipeScript.format.ps1xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,36 @@ $BackgroundColor
19611961
</CustomEntries>
19621962
</CustomControl>
19631963
</View>
1964+
<View>
1965+
<Name>PipeScript.Template</Name>
1966+
<ViewSelectedBy>
1967+
<TypeName>PipeScript.Template</TypeName>
1968+
</ViewSelectedBy>
1969+
<GroupBy>
1970+
<PropertyName>Language</PropertyName>
1971+
</GroupBy>
1972+
<TableControl>
1973+
<TableHeaders>
1974+
<TableColumnHeader>
1975+
</TableColumnHeader>
1976+
<TableColumnHeader>
1977+
</TableColumnHeader>
1978+
</TableHeaders>
1979+
<TableRowEntries>
1980+
<TableRowEntry>
1981+
<Wrap />
1982+
<TableColumnItems>
1983+
<TableColumnItem>
1984+
<PropertyName>Name</PropertyName>
1985+
</TableColumnItem>
1986+
<TableColumnItem>
1987+
<PropertyName>Template</PropertyName>
1988+
</TableColumnItem>
1989+
</TableColumnItems>
1990+
</TableRowEntry>
1991+
</TableRowEntries>
1992+
</TableControl>
1993+
</View>
19641994
<View>
19651995
<Name>PipeScript.Transpiler</Name>
19661996
<ViewSelectedBy>

PipeScript.ps.psd1

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
@{
2+
ModuleVersion = '0.2'
3+
Description = 'An Extensible Transpiler for PowerShell (and anything else)'
4+
RootModule = 'PipeScript.psm1'
5+
PowerShellVersion = '4.0'
6+
AliasesToExport = '*'
7+
FormatsToProcess = 'PipeScript.format.ps1xml'
8+
TypesToProcess = 'PipeScript.types.ps1xml'
9+
Guid = 'fc054786-b1ce-4ed8-a90f-7cc9c27edb06'
10+
CompanyName = 'Start-Automating'
11+
Copyright = '2022 Start-Automating'
12+
Author = 'James Brundage'
13+
FunctionsToExport = '' <#{
14+
$exportNames = Get-ChildItem -Recurse -Filter '*-*.ps1' |
15+
Where-Object Name -notmatch '\.ps1{0,1}\.ps1' |
16+
Foreach-Object { $_.Name.Substring(0, $_.Name.Length - $_.Extension.Length) }
17+
"'$($exportNames -join "','")'"
18+
}#>
19+
PrivateData = @{
20+
PSData = @{
21+
ProjectURI = 'https://github.com/StartAutomating/PipeScript'
22+
LicenseURI = 'https://github.com/StartAutomating/PipeScript/blob/main/LICENSE'
23+
RecommendModule = @('PSMinifier')
24+
RelatedModule = @()
25+
BuildModule = @('EZOut','Piecemeal','PipeScript','HelpOut', 'PSDevOps')
26+
Tags = 'PipeScript','PowerShell', 'Transpilation', 'Compiler'
27+
ReleaseNotes = @'
28+
## 0.2:
29+
30+
* Massive Improvements in Templating
31+
* Templates can be used interactively (Fixes #285)
32+
* Renaming all Inline Transpilers to Template Transpilers
33+
* Natural Parsing Improvements
34+
* ArrayLiterals are expanded (Fixes #291)
35+
* AsSentence now only allows one value into a singleton (Fixes #279)
36+
* Not expanding expandable strings (Fixes #286)
37+
* Transpilers can change nearby context (Fixes #292)
38+
* Allowing dot syntax to extend across multiple statements (Fixes #273)
39+
* Adding requires keyword (Fixes #293)
40+
* PipeScript modifies its own manifest (Fixes #294)
41+
42+
---
43+
44+
Additional history in [CHANGELOG](https://pipescript.start-automating.com/CHANGELOG)
45+
'@
46+
}
47+
}
48+
}

PipeScript.psd1

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
ModuleVersion = '0.1.9'
2+
ModuleVersion = '0.2'
33
Description = 'An Extensible Transpiler for PowerShell (and anything else)'
44
RootModule = 'PipeScript.psm1'
55
PowerShellVersion = '4.0'
@@ -10,6 +10,7 @@
1010
CompanyName = 'Start-Automating'
1111
Copyright = '2022 Start-Automating'
1212
Author = 'James Brundage'
13+
FunctionsToExport = 'Build-PipeScript','Get-PipeScript','Get-Transpiler','Invoke-PipeScript','Join-PipeScript','New-PipeScript','Search-PipeScript','Update-PipeScript','Use-PipeScript'
1314
PrivateData = @{
1415
PSData = @{
1516
ProjectURI = 'https://github.com/StartAutomating/PipeScript'
@@ -19,20 +20,25 @@
1920
BuildModule = @('EZOut','Piecemeal','PipeScript','HelpOut', 'PSDevOps')
2021
Tags = 'PipeScript','PowerShell', 'Transpilation', 'Compiler'
2122
ReleaseNotes = @'
22-
## 0.1.9:
23-
* Protocol Transpilers
24-
* Adding JSONSchema transpiler (Fixes #274)
25-
* HTTP Protocol: Only allowing HTTP Methods (Fixes #275)
26-
* Keyword improvements:
27-
* all scripts in $directory (Fixes #277)
28-
* 'new' keyword recursively transpiles constructor arguments (Fixes #271)
29-
* Core improvements:
30-
* Core Transpiler stops transpilation of an item after any output (Fixes #280)
31-
* [CommandAst].AsSentence now maps singleton values correctly (Fixes #279)
32-
* PipeScript now handles CommandNotFound, enabling interactive use (Fixes #281)
23+
## 0.2:
24+
25+
* Massive Improvements in Templating
26+
* Templates can be used interactively (Fixes #285)
27+
* Renaming all Inline Transpilers to Template Transpilers
28+
* Natural Parsing Improvements
29+
* ArrayLiterals are expanded (Fixes #291)
30+
* AsSentence now only allows one value into a singleton (Fixes #279)
31+
* Not expanding expandable strings (Fixes #286)
32+
* Transpilers can change nearby context (Fixes #292)
33+
* Allowing dot syntax to extend across multiple statements (Fixes #273)
34+
* Adding requires keyword (Fixes #293)
35+
* PipeScript modifies its own manifest (Fixes #294)
36+
37+
---
3338
3439
Additional history in [CHANGELOG](https://pipescript.start-automating.com/CHANGELOG)
3540
'@
3641
}
3742
}
3843
}
44+

0 commit comments

Comments
 (0)