Commit Graph

26 Commits

Author SHA1 Message Date
undergroundwires
862914b06e Add "with" expression for templating #53
Allows optionally rendering content if an argument is given. The
expression is designed to be used with `optional` parameters.

Goal is to allow using `RunPowerShell` function on every function that
consists of PowerShell code. Before this commit, they were all required
to provide revertCode, or none of them could be able to have it. It
would not work because some scripts can be reverted, meanwhile some are
one-way scripts that cannot be reverted (such as cleaning scripts). In
this case a way to optionally render revertCode was required. `with`
expression give each callee script ability to turn off `revertCode` if
not needed, therefore enables using `RunPowerShell` everywhere.

This commit also improves error message for script code for better
debugging and refactors parser tests for more code reuse. It also adds
more tests to parameter substitution, and renames some tests of both
expressions for consistency.
2021-09-06 21:02:41 +01:00
undergroundwires
00d8e551db refactor extra code, duplicates, complexity
- refactor array equality check and add tests
- remove OperatingSystem.Unknown causing extra logic, return undefined instead
- refactor enum validation to share same logic
- refactor scripting language factories to share same logic
- refactor too many args in runCodeAsync
- refactor ScriptCode constructor to reduce complexity
- fix writing useless write to member object since another property write always override it
2021-04-11 14:37:02 +01:00
undergroundwires
646db90585 refactor script compilation to make it easy to add new expressions #41 #53 2021-03-05 15:52:49 +01:00
undergroundwires
7661575573 allow functions to call other functions #53 2021-02-14 11:18:31 +01:00
undergroundwires
8a8b7319d5 add initial macOS support #40 2021-01-13 16:31:20 +01:00
undergroundwires
2e40605d59 refactor to allow switching ICategoryCollection context #40 2021-01-05 22:28:38 +01:00
undergroundwires
6fe858d86a rename Application to CategoryCollection #40 2021-01-02 17:50:47 +01:00
undergroundwires
e14bf2bfa0 add scripts to prevent family safety monitoring 2020-12-30 19:49:38 +01:00
undergroundwires
f7557bcc0f refactor application.yaml to become an os definition #40 2020-12-27 18:14:38 +01:00
undergroundwires
8ce06facbd add support for shared functions #41 2020-11-01 18:36:55 +01:00
undergroundwires
1072505219 show icons on cards during indeterminate and fully selected states 2020-10-25 12:55:40 +01:00
undergroundwires
14be3017c5 add support for different recommendation levels: strict and standard 2020-10-19 15:12:03 +01:00
undergroundwires
784a67afff refactor to read more from package.json 2020-09-22 20:41:12 +01:00
undergroundwires
b6ccb5927a fix comment lines are being detected as duplicate in validation 2020-09-12 00:13:58 +01:00
undergroundwires
b789250cb8 add auto-highlighting of selected/updated code 2020-08-25 16:52:38 +01:00
undergroundwires
66d4d39d5b refactorings 2020-08-09 03:00:18 +01:00
undergroundwires
9c063d59de added ability to revert (#21) 2020-07-19 02:26:56 +01:00
undergroundwires
691f989682 reading version from package.json instead of version file #5 2020-04-26 15:47:20 +00:00
undergroundwires
89862b2775 🔍 support for search 2020-01-10 01:35:09 +01:00
undergroundwires
3140cc663b default selection is now none 2020-01-06 20:02:12 +01:00
undergroundwires
5ccc7c5952 fixed wrong line dumps 2020-01-06 18:57:00 +01:00
undergroundwires
57037aaefc simplified finding duplicates 2020-01-06 18:19:28 +01:00
undergroundwires
d38f6cd6a8 optimized find queries & refactorings 2020-01-06 17:45:53 +01:00
undergroundwires
c646c10273 refactoring to new function 2020-01-06 17:45:38 +01:00
undergroundwires
e99f210c9d typo fixes + whitespace refactorings 2020-01-01 12:31:41 +01:00
undergroundwires
4e7f244190 Initial commit 2019-12-31 16:23:45 +01:00