True when a string param should accept an encoding-tagged payload. Driven by an explicit "binary": true flag on the schema property (emitted by SchemaBuilder's byteProp), NOT by the parameter name -- name-based guessing wrongly wrapped text params like console.send's `data` in base64.
(name, prop)
| 49 | |
| 50 | |
| 51 | def is_byte_param(name, prop): |
| 52 | """True when a string param should accept an encoding-tagged payload. |
| 53 | |
| 54 | Driven by an explicit "binary": true flag on the schema property (emitted by |
| 55 | SchemaBuilder's byteProp), NOT by the parameter name -- name-based guessing |
| 56 | wrongly wrapped text params like console.send's `data` in base64. |
| 57 | """ |
| 58 | return bool(prop.get("binary")) and prop.get("type", "string") == "string" |
| 59 | |
| 60 | |
| 61 | def ordered_params(cmd): |