Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
341 commits
Select commit Hold shift + click to select a range
021e95e
refactor(Compiler): Hashing changes
DaRacci Jul 30, 2024
a99b4b6
chore: vscode stuff
DaRacci Jul 30, 2024
16c454b
fix(Compiler): Script Template
DaRacci Jul 30, 2024
11abaa1
fix(Compiler): Fix import names and add background resolving.
DaRacci Jul 30, 2024
d46a370
fix(Compiler): rename psd1 for remote modules so they actually work
DaRacci Jul 30, 2024
f9e11bc
chore: another module
DaRacci Jul 30, 2024
1e5f8ac
fix(Compiler): hash calculations
DaRacci Aug 1, 2024
7ab8160
fix(Compiler): the param block shouldn't be removed anymore
DaRacci Aug 1, 2024
23801f5
fix: environment & logging fixes
DaRacci Aug 1, 2024
91821e9
fix: script error handling
DaRacci Aug 1, 2024
e2b6df7
fix: get the actual error, no longer need to remove from here
DaRacci Aug 1, 2024
fc3c594
feat: add missing param block to script & cleanup modules better
DaRacci Aug 1, 2024
4f8434f
chore: use param for testing
DaRacci Aug 1, 2024
0430869
ci: sarif reports & c# compiler coverage
DaRacci Aug 1, 2024
e8fa95d
chore: rename common files
DaRacci Aug 1, 2024
c11f58b
chore: fix references to renamed common modules
DaRacci Aug 1, 2024
b67edfc
fix(Compiler): missreporting scoped functions as not available
DaRacci Aug 2, 2024
1fc2b67
refactor(Compiler): Implement verbosity and quiet flags
DaRacci Aug 2, 2024
e0615db
feat: WIP installer for all script requirements
DaRacci Aug 5, 2024
994162a
chore: migrate for new compiler
DaRacci Aug 5, 2024
857b1f2
refactor(Compiler): a little bit of cleaning
DaRacci Aug 5, 2024
3e46234
feat(Compiler): Analyser rules & Multi File Compiling
DaRacci Aug 5, 2024
3afeb04
feat(Compiler): Support multiple function names per suppression
DaRacci Aug 6, 2024
d895f67
feat(Compiler): Support * statements in exports from remote modules, …
DaRacci Aug 6, 2024
27a1f21
chore(Compiler): Less console spam
DaRacci Aug 6, 2024
c0ebf55
chore: more migrating
DaRacci Aug 6, 2024
32a8c0b
refactor(Compiler): Encode as base64 instead of hex for better file s…
DaRacci Aug 6, 2024
33b15f0
fix(Compiler): Keep directory tree for output
DaRacci Aug 6, 2024
e4ca161
fix(Compiler): Missing dll for some powershell modules during resolving
DaRacci Aug 6, 2024
ef5b861
chore(Compiler): no longer required
DaRacci Aug 6, 2024
2fda258
chore(Compiler): Update DotNet setup action to version 4 and add cach…
DaRacci Aug 6, 2024
2afe064
ci(Compiler): fix ci builder
DaRacci Aug 6, 2024
a7ac7ea
fix(Compiler): Get Suppressions working properly
DaRacci Aug 9, 2024
155cf0b
perf(Compiler): Cache analyser results
DaRacci Aug 9, 2024
661f569
fix(Compiler): Don't require windows only builds, include forms as a …
DaRacci Aug 9, 2024
e030bd4
refactor(ci): Upload artifact of compiler and some other fixes
DaRacci Aug 9, 2024
03ac253
fix(ci): super linter is really broken rn
DaRacci Aug 13, 2024
d978905
refactor(ci): ignore compiled
DaRacci Aug 13, 2024
cf8bb75
style(Compiler): Formatting and license headers
DaRacci Aug 26, 2024
d8718e8
feat(Compiler): Big refactor, cleanup and a few fixes.
DaRacci Aug 30, 2024
3e6729f
refactor(Compiler): Improve FindAvailableFunctions
DaRacci Sep 2, 2024
0300379
test(Compiler): Implement more tests for AstHelper methods.
DaRacci Sep 2, 2024
2fe569f
fix(Compiler): More async, fix race issues & more tests
DaRacci Sep 5, 2024
0d662bc
fix(Compiler): code coverage gen task
DaRacci Sep 5, 2024
ebd2d4d
fix(Compiler): End of Central Directory record could not be found.
DaRacci Sep 6, 2024
8b97da2
test(Compiler): More tests!
DaRacci Sep 6, 2024
64725f9
fix(Compiler): Not exiting when finished.
DaRacci Sep 6, 2024
bdd5ac1
fix(Compiler): Error when no script has no module dependencies.
DaRacci Sep 6, 2024
926c775
fix(Compiler): Compare functions ignore case
DaRacci Sep 6, 2024
aa0cdc9
fix(Compiler): Prevent error if verticies are modified while waiting.
DaRacci Sep 6, 2024
fbaabcb
fix(Compiler): Caching for Analyser
DaRacci Sep 12, 2024
f7f6a9e
refactor(Compiler): Improved Suppressions from ast
DaRacci Sep 12, 2024
100e79b
fix(Compiler): async issues and a little bit of refactoring
DaRacci Sep 12, 2024
5a07a21
fix(Compiler): module name for cleanup
DaRacci Sep 12, 2024
ac70a4f
test(Compiler): Add some new tests
DaRacci Sep 13, 2024
28d69f1
refactor(Compiler): Implement checking for aliases in UseOfUndefinedF…
DaRacci Sep 13, 2024
ac925b4
fix: Fixup modules for use with new compiler
DaRacci Sep 13, 2024
aaeadd5
fix(Compiler): Enriching of errors not actually working.
DaRacci Sep 16, 2024
3c6e712
refactor(Compiler): Read partial file when creating resolvables.
DaRacci Sep 16, 2024
e225bde
feat(Compiler): Output debuggable content when error occurs during As…
DaRacci Sep 16, 2024
e1a360a
refactor(Compiler): disable analyser dep calculation for key & better…
DaRacci Sep 20, 2024
7337fdb
fix(Compiler): Actually wait and report compiler errors
DaRacci Sep 20, 2024
2ec7f28
feat(Compiler): Add newline and comment removal updaters; refactor He…
DaRacci Sep 23, 2024
1bcd30c
fix(Compiler): Improve file deletion error handling and enhance error…
DaRacci Sep 23, 2024
3d1124f
feat(Compiler): Add support for extra module info JSON and enhance ex…
DaRacci Sep 23, 2024
6826163
fix(Compiler): Missing functions for ExchangeMangementOnline & PowerS…
DaRacci Sep 23, 2024
19b7165
fix(Compiler): misc script fixes for new compiler
DaRacci Sep 23, 2024
3538c92
fix(Compiler): fix export issue when running from powershell core
DaRacci Sep 24, 2024
49a4f61
fix(Compiler): Add Analyser.psm1 to all modules.
DaRacci Sep 26, 2024
639a684
fix(Compiler): Fix the NewLineRemovalUpdater and repurpose into White…
DaRacci Sep 26, 2024
2188ee7
fix(Compiler): Disable PublishTrimmed for compatibility with WinForms
DaRacci Sep 26, 2024
5ae30c6
fix(ci): prevent double build
DaRacci Sep 26, 2024
f4974f2
fix(ci): double builds on other workflows
DaRacci Sep 26, 2024
856770e
fix(Compiler): Update WhitespaceUpdater to include ModuleNotFoundDuri…
DaRacci Sep 26, 2024
0ff7667
fix(Compiler): Symbolic links
DaRacci Sep 26, 2024
89ea97f
fix(Compiler): Error displays
DaRacci Sep 27, 2024
207414c
fix(Compiler): Fix invalid exported resource files
DaRacci Sep 27, 2024
7e76642
feat(Compiler): Enhance error reporting with location details
DaRacci Sep 27, 2024
894bed0
chore(Compiler): Update launch and task configurations for script com…
DaRacci Sep 27, 2024
09cfad8
docs(CONTRIBUTING): add contributing guidelines and commit message fo…
DaRacci Sep 27, 2024
a59c25d
refactor(Compiler): Update SuppressAnalyserAttribute to improve error…
DaRacci Oct 21, 2024
d3b169e
fix(Compiler): Ensure only the first module is saved to the cache
DaRacci Oct 21, 2024
9bff89d
chore(Compiler): Package Lock Update
DaRacci Oct 21, 2024
9ee7bb0
feat(Analyser): Enhance rules with module support function.
DaRacci Oct 22, 2024
b827649
fix(Compiler): Fix race condition preventing all analysers to finish …
DaRacci Oct 22, 2024
ba6aaaa
feat(Analyser): Add MissingCmdlet rule to enforce CmdletBinding attri…
DaRacci Oct 22, 2024
ad84dfb
feat(Compiler): Better templating support.
DaRacci Oct 22, 2024
ac6e497
fix(Compiler): Fix assembly issues from pre-imported module versions …
DaRacci Oct 22, 2024
a5fe521
feat(Analyser): Enhance MissingCmdlet rule to provide detailed error …
DaRacci Oct 22, 2024
b2a9278
chore(Compiler): Update lock file
DaRacci Oct 22, 2024
6bec7e1
chore(Compiler): Another lock file update
DaRacci Oct 22, 2024
8d8e16d
chore(Compiler): Remove unused package references from lock files
DaRacci Oct 22, 2024
0bf202d
ci: fix build issues & update compiler workflow
DaRacci Oct 22, 2024
60ec564
Fix(Analyser): failing tests
DaRacci Oct 22, 2024
b7cb9ed
chore(Compiler): update PowerShell dependencies and clean up project …
DaRacci Oct 22, 2024
9140a05
fix(Analyser): Incorrect Variable check for compiled scripts
DaRacci Oct 23, 2024
10e43c3
refactor: If we dont have a validation check we shouldn't delete it
DaRacci Oct 23, 2024
6a41c20
fix: attribute issues
DaRacci Oct 23, 2024
55a95e3
feat: Add removal of imported modules back to non compiled scripts
DaRacci Oct 23, 2024
28bf4d2
refactor: the minimum required version is actually 2.3.2
DaRacci Oct 23, 2024
8e69dc5
fix: should not be using log in this module
DaRacci Oct 23, 2024
04e53b0
fix: Incorrect Registry Key Name
DaRacci Oct 23, 2024
6db7526
feat(Setup-Printer): Bultin Support for Konica Minolta Printers
DaRacci Oct 23, 2024
54ab1fc
feat(Get-InstalledSoftware): Allow only processing for select clients…
DaRacci Oct 23, 2024
f63f642
feat(Invoke-RebootNotice): Add time window parameter for reboot notic…
DaRacci Oct 24, 2024
c4baea0
style: formatting updates
DaRacci Oct 24, 2024
5186f5c
perf(Analyser): Cache functions and aliases between scans
DaRacci Oct 24, 2024
39330e7
refactor(Analyser): Mark the extent as the usage of PSCmdlet instead …
DaRacci Oct 24, 2024
7a5c04e
refactor(Compiler): Different colours for warnings vs errors
DaRacci Oct 24, 2024
ea65420
refactor(Connection): Enhance session management with connection IDs …
DaRacci Oct 24, 2024
43469af
chore: Script changes for new compilter
DaRacci Oct 24, 2024
98cad35
chore: Remove unfinished or scripts being replaced by CIPP
DaRacci Oct 24, 2024
f38bf69
fix: Incorrect command usage
DaRacci Oct 25, 2024
e28cd78
fix(Compiler): Prevent the template from being picked up for compiling
DaRacci Oct 25, 2024
111b11c
fix(Compiler): Fix missing parents for debuggable files
DaRacci Oct 25, 2024
981a64c
feat(Compiler): Summary of files with errors and where to find them.
DaRacci Oct 25, 2024
d5a2a37
fix: missing cmdletbinding
DaRacci Oct 25, 2024
b263ca6
feat(ExternalScripts): Add external script management with patching s…
DaRacci Oct 29, 2024
027c758
fix: error due to env being removed before possible restart of script
DaRacci Oct 29, 2024
282f6e3
fix(Compiler): Inconsistent module resolving
DaRacci Oct 29, 2024
6f50ce5
chore: upgrade target framework to net9.0-windows
DaRacci Oct 29, 2024
7b2a75f
ci: update dotnet version for building
DaRacci Oct 29, 2024
abb2a34
chore: remove deprecated script
DaRacci Oct 29, 2024
fe87f80
feat(Compiler): Add Export Definitions for AzureAD
DaRacci Oct 31, 2024
94f28e3
refactor(Compiler): Improve Thread Safety in ResolvableParent.
DaRacci Nov 1, 2024
b476205
refactor(Compiler): Cache instances of ExtraModuleInfo
DaRacci Nov 1, 2024
1e63404
fix(Compiler): Fix inconsistency of ComputedHash
DaRacci Nov 1, 2024
fa3de39
fix(Compiler): Empty name when compiling a single script
DaRacci Nov 1, 2024
8183a75
refactor: Rename schemas files to has suffixed with .schema.jsonc
DaRacci Nov 1, 2024
cd63fb5
test(Compiler): Add unit tests for Program and enhance test utilities
DaRacci Nov 1, 2024
3bdfc13
refactor(Compiler): Handle issues with input better & tests
DaRacci Nov 5, 2024
9d57ed9
fix: Fix crash while outputting file and implement additional tests
DaRacci Nov 7, 2024
94aa822
chore: Update share link
DaRacci Jan 27, 2025
021b8ca
fix(Environment): Remove unused logging parameters from Invoke-RunMai…
DaRacci Jan 28, 2025
ad0d4b6
feat(Environment): Introduce Invoke-BlockWrapper for better script bl…
DaRacci Jan 28, 2025
b74a9a5
refactor(Logging): Simplify logging preference checks and enhance par…
DaRacci Jan 28, 2025
24b4b2a
fix(Connection): Improve null parameter handling and enhance context …
DaRacci Jan 28, 2025
65250e5
fix(Environment): Actually execute the correct scriptblocks
DaRacci Jan 30, 2025
67543a2
fix: module imports for powershell 5.1.
DaRacci Jan 30, 2025
c35416b
fix(Compiler): Not passing parameters through to the real script to e…
DaRacci Jan 31, 2025
7052ec6
feat(ModuleUtils): Allow Add-ModuleCallback to be used multiple times…
DaRacci Jan 31, 2025
5c145ee
fix(Compiler): Insertion of Analyser module for all modules
DaRacci Feb 3, 2025
f5ba6dc
feat(scripts): Add script and module for upgrading to Windows 11
DaRacci Feb 3, 2025
372c5bb
fix(Analyser): Compatability for Windows PS
DaRacci Feb 3, 2025
e7592d4
fix(Analyser): Eranious internal PS Error.
DaRacci Feb 3, 2025
a84d56d
fix(ScriptTemplate): Use UTF8Bom for PS < 6
DaRacci Feb 3, 2025
0ecb6b0
feat(Environment): Enhance module setup and teardown handling
DaRacci Feb 3, 2025
bd68afb
test(Analyser): Add tests for MissingCmdlet support and enhance TestD…
DaRacci Feb 3, 2025
c90184d
chore: Add new launch configurations for .NET CLR and Windows PowerShell
DaRacci Feb 3, 2025
c5a955c
feat(ModuleUtils): Allow overriding type accelerators from the same m…
DaRacci Feb 4, 2025
061af24
chore: Remove unused Microsoft.NET.ILLink.Tasks dependency from packa…
DaRacci Feb 4, 2025
a01f2cd
fix(Logging): Colour in compiled job
DaRacci Feb 4, 2025
07dea89
feat(Logging): Enhance error formatting with console width handling a…
DaRacci Feb 4, 2025
f72ab5e
fix(Compiler): Ensure the output scripts are marked with BOM for PS5
DaRacci Feb 7, 2025
17ae70d
fix(script/Update-ToWin11): Fix Intel processor detection
DaRacci Feb 7, 2025
d1d32b0
fix(Compiler): Update temporary module export path to include process…
DaRacci Feb 9, 2025
80e9896
fix(script/Update-ToWin11): Add SkipCheck parameter and improve proce…
DaRacci Feb 10, 2025
3efb0f9
fix(Registry): Add output type for Test-RegistryKey and expand proper…
DaRacci Feb 10, 2025
865d763
fix(script/Update-ToWin11): Enhance error handling and add support fo…
DaRacci Feb 10, 2025
644b546
fix(Compiler): Refactor ContentBytes handling to be Lazy and improve …
DaRacci Feb 10, 2025
f9f3902
fix(Exit): Change global variables to script scope
DaRacci Feb 17, 2025
fcca2ff
refactor(tests): reorganize test structure.
DaRacci Feb 20, 2025
42794d2
feat(external): implement nsight scripts into externals
DaRacci Feb 20, 2025
11aeb5c
fix(tests): remove unnecessary PassThru parameter from Invoke-Pester
DaRacci Feb 20, 2025
8183edb
fix(logging): update preference checks to use GetVariableValue for be…
DaRacci Feb 24, 2025
6e34b3b
feat: Generator for registry scripts from simple json definitions
DaRacci Feb 24, 2025
9250762
docs: Update README.md
DaRacci Feb 24, 2025
d39be62
docs: provide docs and some output type validations
DaRacci Feb 24, 2025
1505405
feat(Logging): Improve Format-Error greatly & add docs
DaRacci Feb 24, 2025
dde7eef
fix(Compiler): Add RootScript field and locks fixing concurrent issues
DaRacci Feb 24, 2025
3782259
chore: misc stuff from stash
DaRacci Feb 24, 2025
c3ed748
test(Cache): Add unit tests for Get-CachedContent and Get-CachedLocat…
DaRacci Feb 24, 2025
259af2a
fix(Logging): they are not mandatory parameters
DaRacci Feb 24, 2025
905475d
fix(Logging): Don't always return with passthru and fix error level s…
DaRacci Feb 24, 2025
2e11a07
test(ConvertTo-InvokableValue): hashtables aren't sorted
DaRacci Feb 24, 2025
c45ccf3
chore: misc test stuff
DaRacci Feb 24, 2025
12dcd6d
fix(Event): enforce mandatory parameters and improve error handling i…
DaRacci Feb 24, 2025
f4e21e3
fix(.gitignore): update patterns to ignore additional build and cover…
DaRacci Feb 24, 2025
6619c4b
fix(Utils): fix variable type resolution for boolean values
DaRacci Feb 25, 2025
6d89c3d
refactor(Cache): enhance Get-CachedLocation function with improved pa…
DaRacci Feb 25, 2025
913a70e
fix(Scope): improve scope formatting and logging behavior
DaRacci Feb 25, 2025
3a12c04
test: Cleanup logging level tests
DaRacci Feb 25, 2025
48bc47c
fix(Event): fix the whole thing
DaRacci Feb 25, 2025
a2d7213
fix(Exit): correct variable name and get tests working
DaRacci Feb 25, 2025
e615db5
feat(external): add functionality to create patches from scripts and …
DaRacci Feb 28, 2025
3f38b04
style: update json indent to 2 spaces
DaRacci Mar 3, 2025
46319ad
feat(external): better context and patch handling, and patch creation…
DaRacci Mar 3, 2025
f940f3c
fix(external/PMECleanup): Ensure log directory is created
DaRacci Mar 4, 2025
b3277ff
fix(external/Update): Use relative paths for context and fix apply no…
DaRacci Mar 4, 2025
6d9d68d
fix(external/Update): Improve ETag handling, patch resolution, and co…
DaRacci Mar 4, 2025
9a2b12a
fix(external): failing patch due to new downloads having the UTF8 BOM.
DaRacci Mar 4, 2025
1fa4fdd
fix(ci): update compiler execution to handle multiple source files in…
DaRacci Mar 10, 2025
61b1391
fix(ci): resolve paths for source and output directories in compile s…
DaRacci Mar 10, 2025
10b4df4
fix(PS5): unicode being broken due to missing bom
DaRacci Mar 13, 2025
53e0c8b
fix(automation): time comparison error
DaRacci Mar 13, 2025
5d56242
fix(logging): improve error message formatting and replace Range with…
DaRacci Mar 13, 2025
2196e09
fix(compiler): ensure RunspacePool is created before closing and disp…
DaRacci Mar 13, 2025
491aaf4
feat(automation): add AlwaysShow parameter to display reboot notice r…
DaRacci Mar 13, 2025
a381041
fix(automation): update paths to actually relative paths
DaRacci Mar 13, 2025
06d81c9
fix(Compiler): Update Powershell SDKs to 7.6.0 preview to fix bug whe…
DaRacci Mar 13, 2025
741f1dc
fix(automation): correct flag retrieval for reboot notice display tim…
DaRacci Mar 13, 2025
7d977a6
fix(ci): update .NET version from 9.0.x to 10.0.x
DaRacci Mar 13, 2025
2136f47
fix(automation/registry): ensure administrator privileges before regi…
DaRacci Mar 14, 2025
a4f9ab0
fix(automation): ensure displayed message is set after sending reboot…
DaRacci Mar 14, 2025
57b60dd
fix(registry): update module paths to use backslashes for consistency
DaRacci Mar 14, 2025
f179e31
fix(environment): error due to null errorrecord
DaRacci Mar 14, 2025
33f4426
fix(registry): add custom value validation and add script heredoc det…
DaRacci Mar 14, 2025
a1b35df
refactor: mirgrate disable-faststartup.ps1 to registry defininitions
DaRacci Mar 14, 2025
7b83cda
chore: commit generated
DaRacci Mar 14, 2025
ce10d44
fix(tests): suppress errors when removing modules in AfterAll blocks
DaRacci Mar 17, 2025
79e96b2
fix(tests): remove AfterAll module cleanup to prevent errors in test …
DaRacci Mar 17, 2025
138ba3f
fix(ci): update dotnet version to 10.0.x for tests
DaRacci Mar 17, 2025
650690e
chore: remove redundant pester.runTestsInNewProcess setting now that …
DaRacci Mar 17, 2025
7a1ad4e
fix(ci): ensure test results are uploaded regardless of test outcome
DaRacci Mar 17, 2025
e58e869
ci(test): run pester tests on each OS
DaRacci Mar 17, 2025
ac8ea57
fix(ci): use gists to prevent github output character limit
DaRacci Mar 17, 2025
f066af7
docs: add README for Compiler project
DaRacci Mar 18, 2025
53f3152
fix(Compiler/tests): fix some testing logic & error due to dep updates
DaRacci Mar 18, 2025
6849227
chore: add .gitattributes for consistent line endings across files
DaRacci Mar 18, 2025
09c12e2
fix: fix tests on unix systems
DaRacci Mar 20, 2025
01563cb
build: add flake and linux support to build
DaRacci Mar 20, 2025
bb1ccd6
style: fix issues from pre-commit hooks
DaRacci Mar 21, 2025
25b3838
style: commit correct line endings
DaRacci Mar 21, 2025
f042c63
ci: fix restore commands
DaRacci Mar 31, 2025
dd11999
fix: add missing using directives for System.IO
DaRacci Mar 31, 2025
a8e84f6
ci: update linter ignore pattern to include external/scripts
DaRacci Mar 31, 2025
31e5383
fix(Compiler): Duplicated modules for the included resource ones
DaRacci Apr 3, 2025
988bd39
fix(Compiler): help & input errors
DaRacci Apr 3, 2025
2beba95
feat(Compiler): add condition to force execution in same pwsh instance
DaRacci Apr 4, 2025
6dd58d1
refactor(Compiler): move to batch group instead of waits.
DaRacci Apr 4, 2025
820b788
fix(Analyser): better mimic the SuppressMessageAttribute
DaRacci Apr 4, 2025
b1c5455
fix(Compiler): Unable to use methods like Clear-Host when running
DaRacci Apr 7, 2025
b393491
chore(deps): update to .NET 10 preview 2
DaRacci Apr 10, 2025
7cb7485
fix(ci): restore issues because of https://github.com/dotnet/sdk/issu…
DaRacci Apr 10, 2025
1e18acc
fix(ci): need to zip all the related dlls too
DaRacci Apr 10, 2025
bdf3aa3
fix(ci): pretty sure we are good to run normally now
DaRacci Apr 10, 2025
162e687
fix(Compiler): missing dll during runtime for powershell
DaRacci Apr 11, 2025
0a25fb6
chore: add documentation to functions in PackageManager.psm1
DaRacci Apr 11, 2025
65ff882
build: suppress warnings that wont be fixed
DaRacci Apr 11, 2025
16bfd80
fix(Compiler): this should be for all platforms
DaRacci Apr 11, 2025
f424701
style: no nouns as name
DaRacci Apr 11, 2025
d715a06
ci: make the compiler verbose for debugging
DaRacci Apr 14, 2025
5ebb5a4
fix(Compiler): if all errors are not exceptions return error code 0
DaRacci Apr 14, 2025
0892d40
chore(Compiler): add error catch for ci error
DaRacci Apr 14, 2025
69f41cc
fix(Compiler): Ensure all dependencies are available when getting exp…
DaRacci Apr 15, 2025
257903b
fix(Compiler): Missing PSResourceGet in some environments
DaRacci Apr 15, 2025
a321b7e
ci: allow manual trigger for compile scripts
DaRacci Apr 15, 2025
7bf22fe
refactor(ci): fix up cleanup script & allow commit for manual run of ci
DaRacci Apr 15, 2025
70a1e6e
fix: chmod +x for script
DaRacci Apr 15, 2025
7a98bb1
ci: better scoped run conditions
DaRacci Apr 15, 2025
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
401 changes: 400 additions & 1 deletion .editorconfig

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake . --no-pure-eval --accept-flake-config
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto eol=lf

*.cmd text eol=crlf
*.bat text eol=crlf
*.vbs text eol=crlf
*.bas text eol=crlf
35 changes: 35 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Compiler

on:
push:
branches: [ master ]
paths: ["src/Compiler/**", ".github/workflows/build.yaml"]
pull_request:
paths: ["src/Compiler/**", ".github/workflows/build.yaml"]
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Setup DotNet
uses: actions/setup-dotnet@v4
with:
cache: true
dotnet-version: 10.0.x
cache-dependency-path: "src/Compiler/packages.lock.json"

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet publish ./src/Compiler/Compiler.csproj -c Release -r win-x64

- uses: actions/upload-artifact@v4
with:
name: Compiler
path: ./src/Compiler/bin/Release/win-x64/publish/Compiler.exe
87 changes: 87 additions & 0 deletions .github/workflows/compile-scripts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Powershell Compiler

on:
push:
branches: [master]
paths: [ "src/**/*.ps1", ".github/workflows/compile-scripts.yaml" ]
pull_request:
paths: [ "src/**/*.ps1", ".github/workflows/compile-scripts.yaml" ]
workflow_dispatch:

jobs:
changes:
runs-on: ubuntu-latest
outputs:
compiled: ${{ steps.changes.outputs.compiled }}
src: ${{ steps.changes.outputs.src }}
src_deleted: ${{ steps.changes.outputs.src_deleted }}
steps:
- name: Checkout
uses: actions/checkout@v4

# Checks for changes in the 'compiled' and 'src' directories
# We also check for deleted files so we can cleanup the compiled directory
- name: Collect Changes for Upcoming Jobs
uses: dorny/[email protected]
id: changes
with:
list-files: shell
filters: |
compiled:
- 'compiled/**'
src:
- 'src/**/*.(ps1|psm1)'
src_deleted:
- deleted: 'src/**/*.(ps1|psm1)'

cleanup-directory:
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.src_deleted == 'true'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Delete Compiled versions of deleted files
id: delete_files
run: ./utils/clean-compiled.sh

- name: Commit Changes
if: ${{ steps.delete_files.outputs.FOUND_DELETED == 'true' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(compiled): Remove compiled versions of deleted files"

build:
uses: ./.github/workflows/build.yaml

compile-scripts:
runs-on: windows-latest
needs: [changes, build]
if: ${{ needs.changes.outputs.src == 'true' }}
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download Compiler Artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: build.yaml
workflow_conclusion: success
name: Compiler
path: /tmp/Compiler

- name: Run Compiler
shell: pwsh
run: /tmp/Compiler/Compiler.exe --input src --output compiled --force -vvv -f

- name: Commit Changes
if: ${{ github.event_name == 'workflow_dispatch' || (needs.changes.outputs.src == 'true' && github.event_name == 'push') }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(compiled): Compile scripts"
104 changes: 0 additions & 104 deletions .github/workflows/compiler.yaml

This file was deleted.

22 changes: 13 additions & 9 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Documentaion
name: Generate PowerShell Docs

on:
push:
branches: [ master ]
paths: [ 'docs/**', 'src/**', 'utils/Generate-Documentation.ps1', '.github/workflows/documentation.yaml' ]
pull_request:
paths: [ 'docs/**', 'src/**' ]
branches: [master]
paths:
- "docs/**"
- "src/**"
- "utils/Generate-Documentation.ps1"
- ".github/workflows/documentation.yaml"

jobs:
update_docs:
name: Update Documentation
runs-on: ubuntu-latest
outputs:
changes: ${{ steps.changes.outputs.changes }}
docs: ${{ steps.changes.outputs.docs }}
permissions:
contents: write
pull-requests: write
Expand All @@ -23,7 +25,9 @@ jobs:

- name: Generate Documentation
shell: pwsh
run: .\utils\Generate-Documentation.ps1
run: |
Install-Module -Name platyPS -Scope CurrentUser
.\utils\Generate-Documentation.ps1

- name: Check for changes
id: changes
Expand All @@ -34,7 +38,7 @@ jobs:
- 'docs/docs/**'

- name: Commit changes
if: ${{ steps.changes.outputs.changes == 'true' }}
if: ${{ steps.changes.outputs.docs == 'true' }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(docs): Update documentation"
Expand All @@ -43,7 +47,7 @@ jobs:
name: Deploy Documentation
runs-on: ubuntu-latest
needs: update_docs
if : ${{ github.event_name == 'push' && needs.update_docs.outputs.changes.docs == 'true' }}
if: ${{ github.event_name == 'push' && needs.update_docs.outputs.docs == 'true' }}
permissions:
contents: read
pull-requests: read
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/external.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: External Script Updater

on:
workflow_dispatch:
push:
paths: [ 'src/external/source/**', 'src/external/Update.ps1' ]
schedule:
- cron: '0 0 * * *'

jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- name: Run Update Script
shell: pwsh
run: ./src/external/Update.ps1

- name: Validate Scripts
shell: pwsh
run: ./src/external/Update.ps1 -Validate

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(external): Update external scripts"
file_pattern: "src/external/scripts/*"
64 changes: 64 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Generate Scripts

on:
push:
branches: [master]
paths:
- "src/automation/registry/Generate.ps1"
- "src/automation/registry/definitions/**"
- ".github/workflows/generate.yaml"

jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Collect Changes
uses: dorny/[email protected]
id: changes
with:
list-files: shell
filters: |
definition:
- 'src/automation/registry/definitions/**'
definition_deleted:
- deleted: 'src/automation/registry/definitions/**'

- name: Remove Deleted Definitions
id: delete_files
if: ${{ steps.changes.outputs.definition_deleted == 'true' }}
run: |
shopt -s globstar nullglob
for file in src/automation/registry/definitions/**; do
no_prefix=${file#src/automation/registry/definitions/}
if [ ! -f "src/automation/registry/Generate.ps1" ]; then
echo "Found deleted definition file ${no_prefix}, deleting."
rm "$file"
fi
done

DIR="src/automation/registry"
DEFINITIONS_DIR="${DIR}/definitions"
GENERATED_DIR="${DIR}/generated"
for file in "${GENERATED_DIR}"/*; do
no_prefix=${file#"$GENERATED_DIR"/}
without_extension=${no_prefix%.*}
fullWithoutExtension="${DEFINITIONS_DIR}/${without_extension}"
if [ ! -f "$fullWithoutExtension.json" ] && [ ! -f "$fullWithoutExtension.jsonc" ]; then
echo "FOUND_DELETED=true" >> "$GITHUB_OUTPUT"
echo "Found deleted generated file ${no_prefix}, deleting."
rm "$file"
fi
done
echo "Cleanup completed."

- name: Execute Generate Script
if: ${{ steps.changes.outputs.definition == 'true' }}
run: pwsh src/automation/registry/Generate.ps1

- name: Commit Changes
if: ${{ (steps.changes.outputs.definition == 'true' || steps.delete_files.outputs.FOUND_DELETED == 'true') && github.event_name == 'push' }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore(Generated): Update generated scripts"
Loading