( command: unknown, options?: UserScriptSecretSanitizerOptions, )
| 897 | } |
| 898 | |
| 899 | export function stripUserScriptSecretRefsFromCommand( |
| 900 | command: unknown, |
| 901 | options?: UserScriptSecretSanitizerOptions, |
| 902 | ): void { |
| 903 | if (!isRecord(command)) return; |
| 904 | |
| 905 | if (command.type === "UserScript") { |
| 906 | stripSecretRefsFromSettings( |
| 907 | command.settings, |
| 908 | getSecretOptionNamesForCommand(command, options), |
| 909 | options, |
| 910 | ); |
| 911 | } |
| 912 | |
| 913 | if (Array.isArray(command.thenCommands)) { |
| 914 | stripUserScriptSecretRefsFromCommands(command.thenCommands, options); |
| 915 | } |
| 916 | if (Array.isArray(command.elseCommands)) { |
| 917 | stripUserScriptSecretRefsFromCommands(command.elseCommands, options); |
| 918 | } |
| 919 | |
| 920 | stripUserScriptSecretRefsFromChoice(command.choice, options); |
| 921 | } |
| 922 | |
| 923 | export function stripUserScriptSecretRefsFromCommands( |
| 924 | commands: unknown, |
no test coverage detected