Method: Fastlane::CommandParser.parse

Defined in:
fastlane/lib/fastlane/server/command_parser.rb

.parse(json: nil) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'fastlane/lib/fastlane/server/command_parser.rb', line 7

def self.parse(json: nil)
  if json.strip == "done"
    return intercept_old_done_command
  end

  command_json = JSON.parse(json)
  command_type_json = command_json['commandType']

  if command_type_json.nil?
    # Old Swift style (needs upgrade)
    return handle_old_style_action_command(command_json: command_json)
  else
    # New Swift command style
    return handle_new_style_commands(command_json: command_json)
  end
end