-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
PipeScript.psd1
264 lines (239 loc) · 13 KB
/
PipeScript.psd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
@{
ModuleVersion = '0.2.8'
Description = 'Metaprogram PowerShell (and everything else)'
RootModule = 'PipeScript.psm1'
PowerShellVersion = '4.0'
AliasesToExport = '*'
FormatsToProcess = 'PipeScript.format.ps1xml'
TypesToProcess = 'PipeScript.types.ps1xml'
Guid = 'fc054786-b1ce-4ed8-a90f-7cc9c27edb06'
CompanyName = 'Start-Automating'
Copyright = '2022-2023 Start-Automating'
Author = 'James Brundage'
FunctionsToExport = 'Get-Transpiler','Start-PSNode','PipeScript.Optimizer.ConsolidateAspects','Route.Uptime','Route.VersionInfo','Export-Pipescript','Get-PipeScript','Import-PipeScript','Invoke-PipeScript','Join-PipeScript','New-PipeScript','Search-PipeScript','Update-PipeScript','Use-PipeScript','Import-ModuleMember','Export-Json','Import-Json','ConvertFrom-CliXml','ConvertTo-CliXml','Get-Interpreter','Invoke-Interpreter','Out-Parser','Parse.CSharp','Parse.PowerShell','Protocol.HTTP','Protocol.JSONSchema','Protocol.OpenAPI','Protocol.UDP','Aspect.DynamicParameter','Aspect.ModuleExtensionType','Aspect.ModuleExtensionPattern','Aspect.ModuleExtensionCommand','Aspect.GroupObjectByTypeName','Aspect.GroupObjectByType','Signal.Nothing','Signal.Out','PipeScript.PostProcess.InitializeAutomaticVariables','PipeScript.PostProcess.PartialFunction','Out-HTML','PipeScript.Automatic.Variable.IsPipedTo','PipeScript.Automatic.Variable.IsPipedFrom','PipeScript.Automatic.Variable.MyCallstack','PipeScript.Automatic.Variable.MySelf','PipeScript.Automatic.Variable.MyParameters','PipeScript.Automatic.Variable.MyCaller','PipeScript.Automatic.Variable.MyCommandAst','Compile.LanguageDefinition','Language.JavaScript','Template.Assignment.js','Template.Class.js','Template.DoLoop.js','Template.ForEachLoop.js','Template.ForLoop.js','Template.Function.js','Template.HelloWorld.js','Template.InvokeMethod.js','Template.RegexLiteral.js','Template.TryCatch.js','Template.WhileLoop.js','Language.Rust','Language.Lua','Language.FSharp','Language.GCode','Language.XSD','Language.Ruby','Template.HelloWorld.rb','Language.Haxe','Language.Scala','Language.Racket','Language.SQL','Language.Arduino','Language.PipeScript','Language.Java','Language.Kotlin','Language.Bicep','Language.Markdown','Language.Go','Template.HelloWorld.go','Language.C3','Language.XSL','Language.GLSL','Language.JSON','Language.Batch','Language.TypeScript','Template.HelloWorld.ts','Language.BASIC','Language.XML','Language.CSS','Language.Vue','Language.YAML','Language.TCL','Language.SVG','Language.Docker','Language.CSharp','Template.Class.cs','Template.HelloWorld.cs','Template.Method.cs','Template.Namespace.cs','Template.Property.cs','Template.TryCatch.cs','Language.PowerShell','Language.PowerShellData','Language.PowerShellXML','Language.Conf','Language.Bash','Language.HCL','Language.Razor','Language.OpenSCAD','Language.RSS','Language.ADA','Language.XAML','Language.R','Language.Dart','Language.Crystal','Template.HelloWorld.cr','Language.Perl','Language.BrightScript','Language.Wren','Template.HelloWorld.wren','Language.CPlusPlus','Template.HelloWorld.cpp','Template.Include.cpp','Language.Liquid','Language.Eiffel','Language.Python','Template.Assignment.py','Template.DoLoop.py','Template.HelloWorld.py','Template.Import.py','Template.UntilLoop.py','Template.WhileLoop.py','Language.WebAssembly','Language.HLSL','Language.PHP','Language.Kusto','Language.C','Template.Include.c','Language.TOML','Language.HTML','Language.LaTeX','Language.ATOM','Language.ObjectiveC'
PrivateData = @{
FunctionTypes = @{
'Partial' = @{
Description = 'A partial function.'
Pattern = '(?>PipeScript\p{P})?Partial\p{P}'
}
'Optimizer' = @{
Description = 'Optimization Commands'
Pattern = '
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
Optimiz[^\p{P}]+\p{P} # Optimiz + Many NotPunctuation + Punctuation
'
}
'Protocol' = @{
Description = 'Protocol Commands'
Pattern = '
(?>PipeScript\p{P})? # Optional PipeScript + Punctuation
(?>Protocol\p{P}) # Protocol + Punctuation
(?=[^\p{P}]+$) # Followed by anything but punctuation.
'
}
'PipeScriptNoun' = @{
Description = 'Commands with the noun PipeScript'
Pattern = '[^\-]+\-PipeScript$'
}
}
ScriptTypes = @{
'BuildScript' = @{
Description = 'A file that will be run at build time.'
Pattern = '(?<=(?>^|\.))build\.ps1$'
}
}
CommandTypes = @{
'Aspect' = @{
Description = 'An aspect of code.'
Pattern = '
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
Aspect\p{P} # Followed by Aspect and punctuation.
'
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
}
'Analyzer' = @{
Description = 'Analyzation Commands'
Pattern = '
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
Analy[zs][^\p{P}]+\p{P} # Anal[zs] + Many NotPunctuation + Punctuation
'
}
'AutomaticVariable' = @{
Description = 'An automatic variable.'
Pattern = '
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
(?>Automatic|Magic) # automatic or magic
\p{P}?Variable\p{P} # Optional Punctation + Variable + Punctuation
(?=[^\p{P}]+$) # Followed by anything but punctuation.
'
CommandType = '(?>Function|Alias)'
}
'Language' = @{
Description = 'Language Commands describe languages'
Pattern = '
Language # Language
(?>
\.ps1$ # ending with .ps1
| # or
\p{P} # followed by punctuation
)
'
CommandType = '(?>Function|Alias)'
}
'Interface' = @{
Description = 'An Interface Command'
Pattern = '(?>PipeScript\p{P})?Interface\p{P}'
}
'Sentence' = @{
Description = 'Sentence Commands'
Pattern = '(?>PipeScript\p{P})?Sentence\p{P}'
}
'Compiler' = @{
Description = 'A Compiler'
Pattern = '
(?>
\.psx.ps1$|
Compiler\.ps1$|
\.psc.ps1$|
Compile[sr]?\p{P}
)
'
ExcludeCommandType = 'Application'
}
'PreProcessor' = @{
Description = 'Preprocessing Commands'
Pattern = '
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
PreProc[^\p{P}]+\p{P} # Preproc + Many NotPunctuation + Punctuation
'
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
}
'PostProcessor' = @{
Description = 'PostProcessing Commands'
Pattern = '
(?>PipeScript\p{P})? # (optionally) PipeScript+Punctuation
PostProc[^\p{P}]+\p{P} # Postproc + Many NotPunctuation + Punctuation
'
ExcludeCommandType = '(?>Application|Script|Cmdlet)'
}
'Parser' = @{
Description = 'Parsers'
Pattern = '
(?>^|\.) # After a period or the start of a string
Parse[sr]? # Parse or Parses or Parser + Punctuation
(?>
\.ps1$ # Ending with .ps1
| # or
\p{P}
)
'
}
'Transpiler' =
@{
Description = 'Transpiles an object into anything.'
Pattern = '
(?>
(?:\.psx\.ps1$) # A .PSX.PS1 Script
|
(?<![\-_]) # not after dash or underscore
(?:PipeScript\p{P})?(?>Transpiler|PSX)
(?!.+?\.ps1$)
)
'
}
'Transform' = @{
Description = 'Transforms'
Pattern = '
(?>
# Transforms have two forms, one that is more "query" friendly
(?:
\=\>? # =>?
(?<TransformStep>
(?:.|\s){0,}?(?=\z|\=\>?)
)
){1,}
|
# 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)'
}
'Route' = @{
Pattern = '
(?>^|\.) # After a period or the start of a string
Route[sr]? # The words Route or Routes or Router
(?> # Followed by either
\.ps1$ # the .ps1 and end of string
| # or
\p{P} # any other punctuation.
)
'
ExcludeCommandType = '(?>Application|Cmdlet)'
}
'Template' =
@{
Description = 'Templates let you write other languages with PipeScript.'
Pattern = '\.ps1{0,1}\.(?<ext>[^\.]+$)'
}
}
Server = 'pipescript.dev', 'pipescript.info', 'pipescript.io'
Servers = 'pipescript.startautomating.com','pipescript.start-automating.com'
Videos = @{
"Run Anything with PipeScript (from RTPSUG)" = "https://www.youtube.com/watch?v=-PuiNAcvalw"
}
PSData = @{
ProjectURI = 'https://github.com/StartAutomating/PipeScript'
LicenseURI = 'https://github.com/StartAutomating/PipeScript/blob/main/LICENSE'
RecommendModule = @('PSMinifier')
RelatedModule = @()
BuildModule = @('EZOut','Piecemeal','PipeScript','HelpOut', 'PSDevOps')
Tags = 'PipeScript','PowerShell', 'Transpilation', 'Compiler'
ReleaseNotes = @'
## PipeScript 0.2.8:
More Implicit Interpretation!
* Invoke-Interpreter will now JSONify non-string arguments (#896)
* Invoke-Interpreter will now call Out-Parser (#857, #858)
* Improved Interpreter exclusions
* `.ExcludePath` excludes path wildcards (#875, #877)
* `.ExcludePattern` excludes by pattern (#875, #876)
* Implicit Interpretation Demo (#886)
* Get-Interpreter (#747)
* New Languages Supported:
* Crystal (#878)
* C3 (#870)
* Export-PipeScript Improvements:
* Conditional Build Support (#907)
* GitHub Build Summary Support (#914)
* More Language Support:
* More Hello Worlds (#846)
* Template.HelloWorld.go
* Template.HelloWorld.py
* Template.HelloWorld.cpp
* Template.HelloWorld.cr
* Python Improvements:
* Python Keywords map (#872)
* Template.Assignment.py (#927)
* Template.DoLoop.py (#929)
* Template.Import.py (#913)
* Template.UntilLoop.py (#939)
* Template.WhileLoop.py (#936)
* New ScriptProperties
* Language.HasPowerShellInterpreter (#904)
* Language.HasInterpreter (#903)
* Language.Alias(es) (#)
* Adding .Parallel option to GitHub action (defaulting to Serial) (#888)
* Fixing Alias for Aliases Compiler (thanks @HCRitter ! )
---
Additional history in [CHANGELOG](https://github.com/StartAutomating/PipeScript/blob/main/CHANGELOG.md)
Like it? Star It! Love it? Support It!
'@
}
}
}