MCPcopy Create free account
hub / github.com/Effect-TS/effect / encodeCommand

Function encodeCommand

packages/effect/src/ui/MessageLog.ts:1863–1872  ·  view source on GitHub ↗
(
  command: Command.Command<any, any>
)

Source from the content-addressed store, hash-verified

1861 * @since 4.2.0
1862 */
1863export 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.
1875const encodeGroup = (command: Command.Command<any, any>): string | null => {

Callers

nothing calls this directly

Calls 2

encodeGroupFunction · 0.85
encodeArgsFunction · 0.85

Tested by

no test coverage detected