( command: Command.Command<any, any> )
| 1861 | * @since 4.2.0 |
| 1862 | */ |
| 1863 | export const encodeCommand = ( |
| 1864 | command: Command.Command<any, any> |
| 1865 | ): typeof CommandWire.Type => ({ |
| 1866 | _tag: command._tag, |
| 1867 | name: command.name, |
| 1868 | group: encodeGroup(command), |
| 1869 | args: command._tag === "Interrupt" |
| 1870 | ? null |
| 1871 | : encodeArgs(command.argsSchema, command.args) |
| 1872 | }) |
| 1873 | |
| 1874 | // The scheduling key holds the group fields' real encoding, so the log re-encodes them redacted. |
| 1875 | const encodeGroup = (command: Command.Command<any, any>): string | null => { |
nothing calls this directly
no test coverage detected