├── .editorconfig ├── .gitignore ├── Dockerfile ├── Dockerfile.build ├── LICENSE.md ├── README.md ├── build.gradle.kts ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle.kts └── src └── main ├── java └── org │ └── samokat │ └── performance │ └── mockserver │ ├── core │ ├── MockServer.java │ └── initializer │ │ ├── Command.java │ │ ├── CommandSwitcher.java │ │ └── Utils.java │ ├── helpers │ └── externalfield │ │ ├── RepresentationsItem.java │ │ ├── Response.java │ │ └── Variables.java │ ├── mocks │ ├── BananaBread.java │ └── Croissant.java │ └── utils │ ├── ExternalField.java │ └── SmtpServer.java └── resources ├── bananabread ├── get_scheme.json └── scheme.json ├── croissant └── stock.json └── log4j.xml /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | end_of_line = lf 4 | indent_size = 4 5 | indent_style = space 6 | insert_final_newline = false 7 | max_line_length = 100 8 | tab_width = 4 9 | ij_continuation_indent_size = 4 10 | ij_formatter_off_tag = @formatter:off 11 | ij_formatter_on_tag = @formatter:on 12 | ij_formatter_tags_enabled = false 13 | ij_smart_tabs = false 14 | ij_wrap_on_typing = false 15 | 16 | [*.css] 17 | ij_css_align_closing_brace_with_properties = false 18 | ij_css_blank_lines_around_nested_selector = 1 19 | ij_css_blank_lines_between_blocks = 1 20 | ij_css_brace_placement = 0 21 | ij_css_hex_color_long_format = false 22 | ij_css_hex_color_lower_case = false 23 | ij_css_hex_color_short_format = false 24 | ij_css_hex_color_upper_case = false 25 | ij_css_keep_blank_lines_in_code = 2 26 | ij_css_keep_indents_on_empty_lines = false 27 | ij_css_keep_single_line_blocks = false 28 | ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 29 | ij_css_space_after_colon = true 30 | ij_css_space_before_opening_brace = true 31 | ij_css_value_alignment = 0 32 | 33 | [*.feature] 34 | tab_width = 4 35 | ij_continuation_indent_size = 8 36 | ij_gherkin_keep_indents_on_empty_lines = false 37 | 38 | [*.gsp] 39 | indent_size = 4 40 | tab_width = 4 41 | ij_continuation_indent_size = 8 42 | ij_gsp_keep_indents_on_empty_lines = false 43 | 44 | [*.haml] 45 | tab_width = 4 46 | ij_continuation_indent_size = 8 47 | ij_haml_keep_indents_on_empty_lines = false 48 | 49 | [*.java] 50 | ij_java_align_consecutive_assignments = false 51 | ij_java_align_consecutive_variable_declarations = false 52 | ij_java_align_group_field_declarations = false 53 | ij_java_align_multiline_annotation_parameters = false 54 | ij_java_align_multiline_array_initializer_expression = false 55 | ij_java_align_multiline_assignment = false 56 | ij_java_align_multiline_binary_operation = false 57 | ij_java_align_multiline_chained_methods = false 58 | ij_java_align_multiline_extends_list = false 59 | ij_java_align_multiline_for = false 60 | ij_java_align_multiline_method_parentheses = false 61 | ij_java_align_multiline_parameters = false 62 | ij_java_align_multiline_parameters_in_calls = false 63 | ij_java_align_multiline_parenthesized_expression = false 64 | ij_java_align_multiline_resources = false 65 | ij_java_align_multiline_ternary_operation = false 66 | ij_java_align_multiline_throws_list = false 67 | ij_java_align_subsequent_simple_methods = false 68 | ij_java_align_throws_keyword = false 69 | ij_java_annotation_parameter_wrap = off 70 | ij_java_array_initializer_new_line_after_left_brace = false 71 | ij_java_array_initializer_right_brace_on_new_line = false 72 | ij_java_array_initializer_wrap = normal 73 | ij_java_assert_statement_colon_on_next_line = false 74 | ij_java_assert_statement_wrap = off 75 | ij_java_assignment_wrap = off 76 | ij_java_binary_operation_sign_on_next_line = true 77 | ij_java_binary_operation_wrap = normal 78 | ij_java_blank_lines_after_anonymous_class_header = 0 79 | ij_java_blank_lines_after_class_header = 1 80 | ij_java_blank_lines_after_imports = 1 81 | ij_java_blank_lines_after_package = 1 82 | ij_java_blank_lines_around_class = 1 83 | ij_java_blank_lines_around_field = 0 84 | ij_java_blank_lines_around_field_in_interface = 0 85 | ij_java_blank_lines_around_initializer = 1 86 | ij_java_blank_lines_around_method = 1 87 | ij_java_blank_lines_around_method_in_interface = 1 88 | ij_java_blank_lines_before_class_end = 0 89 | ij_java_blank_lines_before_imports = 1 90 | ij_java_blank_lines_before_method_body = 0 91 | ij_java_blank_lines_before_package = 0 92 | ij_java_block_brace_style = end_of_line 93 | ij_java_block_comment_at_first_column = true 94 | ij_java_call_parameters_new_line_after_left_paren = false 95 | ij_java_call_parameters_right_paren_on_new_line = false 96 | ij_java_call_parameters_wrap = normal 97 | ij_java_case_statement_on_separate_line = true 98 | ij_java_catch_on_new_line = false 99 | ij_java_class_annotation_wrap = split_into_lines 100 | ij_java_class_brace_style = end_of_line 101 | ij_java_class_count_to_use_import_on_demand = 999 102 | ij_java_class_names_in_javadoc = 1 103 | ij_java_do_not_indent_top_level_class_members = false 104 | ij_java_do_not_wrap_after_single_annotation = false 105 | ij_java_do_while_brace_force = always 106 | ij_java_doc_add_blank_line_after_description = true 107 | ij_java_doc_add_blank_line_after_param_comments = false 108 | ij_java_doc_add_blank_line_after_return = false 109 | ij_java_doc_add_p_tag_on_empty_lines = true 110 | ij_java_doc_align_exception_comments = true 111 | ij_java_doc_align_param_comments = true 112 | ij_java_doc_do_not_wrap_if_one_line = false 113 | ij_java_doc_enable_formatting = true 114 | ij_java_doc_enable_leading_asterisks = true 115 | ij_java_doc_indent_on_continuation = false 116 | ij_java_doc_keep_empty_lines = true 117 | ij_java_doc_keep_empty_parameter_tag = true 118 | ij_java_doc_keep_empty_return_tag = true 119 | ij_java_doc_keep_empty_throws_tag = true 120 | ij_java_doc_keep_invalid_tags = true 121 | ij_java_doc_param_description_on_new_line = false 122 | ij_java_doc_preserve_line_breaks = false 123 | ij_java_doc_use_throws_not_exception_tag = true 124 | ij_java_else_on_new_line = false 125 | ij_java_entity_dd_suffix = EJB 126 | ij_java_entity_eb_suffix = Bean 127 | ij_java_entity_hi_suffix = Home 128 | ij_java_entity_lhi_prefix = Local 129 | ij_java_entity_lhi_suffix = Home 130 | ij_java_entity_li_prefix = Local 131 | ij_java_entity_pk_class = java.lang.String 132 | ij_java_entity_vo_suffix = VO 133 | ij_java_enum_constants_wrap = off 134 | ij_java_extends_keyword_wrap = off 135 | ij_java_extends_list_wrap = normal 136 | ij_java_field_annotation_wrap = split_into_lines 137 | ij_java_finally_on_new_line = false 138 | ij_java_for_brace_force = always 139 | ij_java_for_statement_new_line_after_left_paren = false 140 | ij_java_for_statement_right_paren_on_new_line = false 141 | ij_java_for_statement_wrap = normal 142 | ij_java_generate_final_locals = false 143 | ij_java_generate_final_parameters = false 144 | ij_java_if_brace_force = always 145 | ij_java_imports_layout = $*, |, * 146 | ij_java_indent_case_from_switch = true 147 | ij_java_insert_inner_class_imports = true 148 | ij_java_insert_override_annotation = true 149 | ij_java_keep_blank_lines_before_right_brace = 2 150 | ij_java_keep_blank_lines_between_package_declaration_and_header = 2 151 | ij_java_keep_blank_lines_in_code = 1 152 | ij_java_keep_blank_lines_in_declarations = 2 153 | ij_java_keep_control_statement_in_one_line = false 154 | ij_java_keep_first_column_comment = true 155 | ij_java_keep_indents_on_empty_lines = false 156 | ij_java_keep_line_breaks = true 157 | ij_java_keep_multiple_expressions_in_one_line = false 158 | ij_java_keep_simple_blocks_in_one_line = false 159 | ij_java_keep_simple_classes_in_one_line = false 160 | ij_java_keep_simple_lambdas_in_one_line = false 161 | ij_java_keep_simple_methods_in_one_line = false 162 | ij_java_lambda_brace_style = end_of_line 163 | ij_java_layout_static_imports_separately = true 164 | ij_java_line_comment_add_space = false 165 | ij_java_line_comment_at_first_column = true 166 | ij_java_message_dd_suffix = EJB 167 | ij_java_message_eb_suffix = Bean 168 | ij_java_method_annotation_wrap = split_into_lines 169 | ij_java_method_brace_style = end_of_line 170 | ij_java_method_call_chain_wrap = normal 171 | ij_java_method_parameters_new_line_after_left_paren = false 172 | ij_java_method_parameters_right_paren_on_new_line = false 173 | ij_java_method_parameters_wrap = normal 174 | ij_java_modifier_list_wrap = false 175 | ij_java_names_count_to_use_import_on_demand = 999 176 | ij_java_parameter_annotation_wrap = off 177 | ij_java_parentheses_expression_new_line_after_left_paren = false 178 | ij_java_parentheses_expression_right_paren_on_new_line = false 179 | ij_java_place_assignment_sign_on_next_line = false 180 | ij_java_prefer_longer_names = true 181 | ij_java_prefer_parameters_wrap = false 182 | ij_java_repeat_synchronized = true 183 | ij_java_replace_instanceof_and_cast = false 184 | ij_java_replace_null_check = true 185 | ij_java_replace_sum_lambda_with_method_ref = true 186 | ij_java_resource_list_new_line_after_left_paren = false 187 | ij_java_resource_list_right_paren_on_new_line = false 188 | ij_java_resource_list_wrap = off 189 | ij_java_session_dd_suffix = EJB 190 | ij_java_session_eb_suffix = Bean 191 | ij_java_session_hi_suffix = Home 192 | ij_java_session_lhi_prefix = Local 193 | ij_java_session_lhi_suffix = Home 194 | ij_java_session_li_prefix = Local 195 | ij_java_session_si_suffix = Service 196 | ij_java_space_after_closing_angle_bracket_in_type_argument = false 197 | ij_java_space_after_colon = true 198 | ij_java_space_after_comma = true 199 | ij_java_space_after_comma_in_type_arguments = true 200 | ij_java_space_after_for_semicolon = true 201 | ij_java_space_after_quest = true 202 | ij_java_space_after_type_cast = true 203 | ij_java_space_before_annotation_array_initializer_left_brace = false 204 | ij_java_space_before_annotation_parameter_list = false 205 | ij_java_space_before_array_initializer_left_brace = false 206 | ij_java_space_before_catch_keyword = true 207 | ij_java_space_before_catch_left_brace = true 208 | ij_java_space_before_catch_parentheses = true 209 | ij_java_space_before_class_left_brace = true 210 | ij_java_space_before_colon = true 211 | ij_java_space_before_colon_in_foreach = true 212 | ij_java_space_before_comma = false 213 | ij_java_space_before_do_left_brace = true 214 | ij_java_space_before_else_keyword = true 215 | ij_java_space_before_else_left_brace = true 216 | ij_java_space_before_finally_keyword = true 217 | ij_java_space_before_finally_left_brace = true 218 | ij_java_space_before_for_left_brace = true 219 | ij_java_space_before_for_parentheses = true 220 | ij_java_space_before_for_semicolon = false 221 | ij_java_space_before_if_left_brace = true 222 | ij_java_space_before_if_parentheses = true 223 | ij_java_space_before_method_call_parentheses = false 224 | ij_java_space_before_method_left_brace = true 225 | ij_java_space_before_method_parentheses = false 226 | ij_java_space_before_opening_angle_bracket_in_type_parameter = false 227 | ij_java_space_before_quest = true 228 | ij_java_space_before_switch_left_brace = true 229 | ij_java_space_before_switch_parentheses = true 230 | ij_java_space_before_synchronized_left_brace = true 231 | ij_java_space_before_synchronized_parentheses = true 232 | ij_java_space_before_try_left_brace = true 233 | ij_java_space_before_try_parentheses = true 234 | ij_java_space_before_type_parameter_list = false 235 | ij_java_space_before_while_keyword = true 236 | ij_java_space_before_while_left_brace = true 237 | ij_java_space_before_while_parentheses = true 238 | ij_java_space_inside_one_line_enum_braces = false 239 | ij_java_space_within_empty_array_initializer_braces = false 240 | ij_java_space_within_empty_method_call_parentheses = false 241 | ij_java_space_within_empty_method_parentheses = false 242 | ij_java_spaces_around_additive_operators = true 243 | ij_java_spaces_around_assignment_operators = true 244 | ij_java_spaces_around_bitwise_operators = true 245 | ij_java_spaces_around_equality_operators = true 246 | ij_java_spaces_around_lambda_arrow = true 247 | ij_java_spaces_around_logical_operators = true 248 | ij_java_spaces_around_method_ref_dbl_colon = false 249 | ij_java_spaces_around_multiplicative_operators = true 250 | ij_java_spaces_around_relational_operators = true 251 | ij_java_spaces_around_shift_operators = true 252 | ij_java_spaces_around_type_bounds_in_type_parameters = true 253 | ij_java_spaces_around_unary_operator = false 254 | ij_java_spaces_within_angle_brackets = false 255 | ij_java_spaces_within_annotation_parentheses = false 256 | ij_java_spaces_within_array_initializer_braces = false 257 | ij_java_spaces_within_braces = false 258 | ij_java_spaces_within_brackets = false 259 | ij_java_spaces_within_cast_parentheses = false 260 | ij_java_spaces_within_catch_parentheses = false 261 | ij_java_spaces_within_for_parentheses = false 262 | ij_java_spaces_within_if_parentheses = false 263 | ij_java_spaces_within_method_call_parentheses = false 264 | ij_java_spaces_within_method_parentheses = false 265 | ij_java_spaces_within_parentheses = false 266 | ij_java_spaces_within_switch_parentheses = false 267 | ij_java_spaces_within_synchronized_parentheses = false 268 | ij_java_spaces_within_try_parentheses = false 269 | ij_java_spaces_within_while_parentheses = false 270 | ij_java_special_else_if_treatment = true 271 | ij_java_subclass_name_suffix = Impl 272 | ij_java_ternary_operation_signs_on_next_line = true 273 | ij_java_ternary_operation_wrap = normal 274 | ij_java_test_name_suffix = Test 275 | ij_java_throws_keyword_wrap = normal 276 | ij_java_throws_list_wrap = off 277 | ij_java_use_external_annotations = false 278 | ij_java_use_fq_class_names = false 279 | ij_java_use_single_class_imports = true 280 | ij_java_variable_annotation_wrap = off 281 | ij_java_visibility = public 282 | ij_java_while_brace_force = always 283 | ij_java_while_on_new_line = false 284 | ij_java_wrap_comments = true 285 | ij_java_wrap_first_method_in_call_chain = false 286 | ij_java_wrap_long_lines = false 287 | 288 | [*.less] 289 | tab_width = 4 290 | ij_continuation_indent_size = 8 291 | ij_less_align_closing_brace_with_properties = false 292 | ij_less_blank_lines_around_nested_selector = 1 293 | ij_less_blank_lines_between_blocks = 1 294 | ij_less_brace_placement = 0 295 | ij_less_hex_color_long_format = false 296 | ij_less_hex_color_lower_case = false 297 | ij_less_hex_color_short_format = false 298 | ij_less_hex_color_upper_case = false 299 | ij_less_keep_blank_lines_in_code = 2 300 | ij_less_keep_indents_on_empty_lines = false 301 | ij_less_keep_single_line_blocks = false 302 | ij_less_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 303 | ij_less_space_after_colon = true 304 | ij_less_space_before_opening_brace = true 305 | ij_less_value_alignment = 0 306 | 307 | [*.sass] 308 | ij_sass_align_closing_brace_with_properties = false 309 | ij_sass_blank_lines_around_nested_selector = 1 310 | ij_sass_blank_lines_between_blocks = 1 311 | ij_sass_brace_placement = 0 312 | ij_sass_hex_color_long_format = false 313 | ij_sass_hex_color_lower_case = false 314 | ij_sass_hex_color_short_format = false 315 | ij_sass_hex_color_upper_case = false 316 | ij_sass_keep_blank_lines_in_code = 2 317 | ij_sass_keep_indents_on_empty_lines = false 318 | ij_sass_keep_single_line_blocks = false 319 | ij_sass_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 320 | ij_sass_space_after_colon = true 321 | ij_sass_space_before_opening_brace = true 322 | ij_sass_value_alignment = 0 323 | 324 | [*.scss] 325 | ij_scss_align_closing_brace_with_properties = false 326 | ij_scss_blank_lines_around_nested_selector = 1 327 | ij_scss_blank_lines_between_blocks = 1 328 | ij_scss_brace_placement = 0 329 | ij_scss_hex_color_long_format = false 330 | ij_scss_hex_color_lower_case = false 331 | ij_scss_hex_color_short_format = false 332 | ij_scss_hex_color_upper_case = false 333 | ij_scss_keep_blank_lines_in_code = 2 334 | ij_scss_keep_indents_on_empty_lines = false 335 | ij_scss_keep_single_line_blocks = false 336 | ij_scss_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 337 | ij_scss_space_after_colon = true 338 | ij_scss_space_before_opening_brace = true 339 | ij_scss_value_alignment = 0 340 | 341 | [*.styl] 342 | tab_width = 4 343 | ij_continuation_indent_size = 8 344 | ij_stylus_align_closing_brace_with_properties = false 345 | ij_stylus_blank_lines_around_nested_selector = 1 346 | ij_stylus_blank_lines_between_blocks = 1 347 | ij_stylus_brace_placement = 0 348 | ij_stylus_hex_color_long_format = false 349 | ij_stylus_hex_color_lower_case = false 350 | ij_stylus_hex_color_short_format = false 351 | ij_stylus_hex_color_upper_case = false 352 | ij_stylus_keep_blank_lines_in_code = 2 353 | ij_stylus_keep_indents_on_empty_lines = false 354 | ij_stylus_keep_single_line_blocks = false 355 | ij_stylus_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow 356 | ij_stylus_space_after_colon = true 357 | ij_stylus_space_before_opening_brace = true 358 | ij_stylus_value_alignment = 0 359 | 360 | [.editorconfig] 361 | ij_editorconfig_align_group_field_declarations = false 362 | ij_editorconfig_space_after_colon = false 363 | ij_editorconfig_space_after_comma = true 364 | ij_editorconfig_space_before_colon = false 365 | ij_editorconfig_space_before_comma = false 366 | ij_editorconfig_spaces_around_assignment_operators = true 367 | 368 | [{*.as,*.js2,*.es}] 369 | indent_size = 4 370 | tab_width = 4 371 | ij_continuation_indent_size = 8 372 | ij_actionscript_align_imports = false 373 | ij_actionscript_align_multiline_array_initializer_expression = false 374 | ij_actionscript_align_multiline_binary_operation = false 375 | ij_actionscript_align_multiline_chained_methods = false 376 | ij_actionscript_align_multiline_extends_list = false 377 | ij_actionscript_align_multiline_for = false 378 | ij_actionscript_align_multiline_parameters = false 379 | ij_actionscript_align_multiline_parameters_in_calls = false 380 | ij_actionscript_align_multiline_ternary_operation = false 381 | ij_actionscript_align_object_properties = 0 382 | ij_actionscript_align_union_types = false 383 | ij_actionscript_align_var_statements = 0 384 | ij_actionscript_array_initializer_new_line_after_left_brace = false 385 | ij_actionscript_array_initializer_right_brace_on_new_line = false 386 | ij_actionscript_array_initializer_wrap = normal 387 | ij_actionscript_assignment_wrap = off 388 | ij_actionscript_binary_operation_sign_on_next_line = true 389 | ij_actionscript_binary_operation_wrap = normal 390 | ij_actionscript_blacklist_imports = rxjs/Rx, node_modules/**/*, @angular/material, @angular/material/typings/** 391 | ij_actionscript_blank_lines_after_imports = 1 392 | ij_actionscript_blank_lines_after_package = 0 393 | ij_actionscript_blank_lines_around_function = 1 394 | ij_actionscript_blank_lines_around_method = 1 395 | ij_actionscript_blank_lines_before_imports = 1 396 | ij_actionscript_blank_lines_before_package = 0 397 | ij_actionscript_block_brace_style = end_of_line 398 | ij_actionscript_call_parameters_new_line_after_left_paren = false 399 | ij_actionscript_call_parameters_right_paren_on_new_line = false 400 | ij_actionscript_call_parameters_wrap = normal 401 | ij_actionscript_catch_on_new_line = false 402 | ij_actionscript_chained_call_dot_on_new_line = true 403 | ij_actionscript_class_brace_style = end_of_line 404 | ij_actionscript_comma_on_new_line = false 405 | ij_actionscript_do_while_brace_force = always 406 | ij_actionscript_else_on_new_line = false 407 | ij_actionscript_enforce_trailing_comma = keep 408 | ij_actionscript_extends_keyword_wrap = off 409 | ij_actionscript_extends_list_wrap = normal 410 | ij_actionscript_field_prefix = _ 411 | ij_actionscript_file_name_style = relaxed 412 | ij_actionscript_finally_on_new_line = false 413 | ij_actionscript_for_brace_force = always 414 | ij_actionscript_for_statement_new_line_after_left_paren = false 415 | ij_actionscript_for_statement_right_paren_on_new_line = false 416 | ij_actionscript_for_statement_wrap = normal 417 | ij_actionscript_force_quote_style = false 418 | ij_actionscript_force_semicolon_style = false 419 | ij_actionscript_function_expression_brace_style = end_of_line 420 | ij_actionscript_if_brace_force = always 421 | ij_actionscript_import_merge_members = global 422 | ij_actionscript_import_prefer_absolute_path = global 423 | ij_actionscript_import_sort_members = true 424 | ij_actionscript_import_sort_module_name = false 425 | ij_actionscript_import_use_node_resolution = true 426 | ij_actionscript_imports_wrap = on_every_item 427 | ij_actionscript_indent_case_from_switch = true 428 | ij_actionscript_indent_chained_calls = true 429 | ij_actionscript_indent_package_children = 0 430 | ij_actionscript_jsx_attribute_value = braces 431 | ij_actionscript_keep_blank_lines_in_code = 1 432 | ij_actionscript_keep_first_column_comment = true 433 | ij_actionscript_keep_indents_on_empty_lines = false 434 | ij_actionscript_keep_line_breaks = true 435 | ij_actionscript_keep_simple_blocks_in_one_line = false 436 | ij_actionscript_keep_simple_methods_in_one_line = false 437 | ij_actionscript_line_comment_at_first_column = true 438 | ij_actionscript_method_brace_style = end_of_line 439 | ij_actionscript_method_call_chain_wrap = off 440 | ij_actionscript_method_parameters_new_line_after_left_paren = false 441 | ij_actionscript_method_parameters_right_paren_on_new_line = false 442 | ij_actionscript_method_parameters_wrap = normal 443 | ij_actionscript_object_literal_wrap = on_every_item 444 | ij_actionscript_parentheses_expression_new_line_after_left_paren = false 445 | ij_actionscript_parentheses_expression_right_paren_on_new_line = false 446 | ij_actionscript_place_assignment_sign_on_next_line = false 447 | ij_actionscript_prefer_as_type_cast = false 448 | ij_actionscript_prefer_parameters_wrap = false 449 | ij_actionscript_reformat_c_style_comments = false 450 | ij_actionscript_space_after_colon = true 451 | ij_actionscript_space_after_comma = true 452 | ij_actionscript_space_after_dots_in_rest_parameter = false 453 | ij_actionscript_space_after_generator_mult = true 454 | ij_actionscript_space_after_property_colon = true 455 | ij_actionscript_space_after_quest = true 456 | ij_actionscript_space_after_type_colon = false 457 | ij_actionscript_space_after_unary_not = false 458 | ij_actionscript_space_before_async_arrow_lparen = true 459 | ij_actionscript_space_before_catch_keyword = true 460 | ij_actionscript_space_before_catch_left_brace = true 461 | ij_actionscript_space_before_catch_parentheses = true 462 | ij_actionscript_space_before_class_lbrace = true 463 | ij_actionscript_space_before_colon = true 464 | ij_actionscript_space_before_comma = false 465 | ij_actionscript_space_before_do_left_brace = true 466 | ij_actionscript_space_before_else_keyword = true 467 | ij_actionscript_space_before_else_left_brace = true 468 | ij_actionscript_space_before_finally_keyword = true 469 | ij_actionscript_space_before_finally_left_brace = true 470 | ij_actionscript_space_before_for_left_brace = true 471 | ij_actionscript_space_before_for_parentheses = true 472 | ij_actionscript_space_before_for_semicolon = false 473 | ij_actionscript_space_before_function_left_parenth = true 474 | ij_actionscript_space_before_generator_mult = false 475 | ij_actionscript_space_before_if_left_brace = true 476 | ij_actionscript_space_before_if_parentheses = true 477 | ij_actionscript_space_before_method_call_parentheses = false 478 | ij_actionscript_space_before_method_left_brace = true 479 | ij_actionscript_space_before_method_parentheses = false 480 | ij_actionscript_space_before_property_colon = false 481 | ij_actionscript_space_before_quest = true 482 | ij_actionscript_space_before_switch_left_brace = true 483 | ij_actionscript_space_before_switch_parentheses = true 484 | ij_actionscript_space_before_try_left_brace = true 485 | ij_actionscript_space_before_type_colon = false 486 | ij_actionscript_space_before_unary_not = false 487 | ij_actionscript_space_before_while_keyword = true 488 | ij_actionscript_space_before_while_left_brace = true 489 | ij_actionscript_space_before_while_parentheses = true 490 | ij_actionscript_spaces_around_additive_operators = true 491 | ij_actionscript_spaces_around_arrow_function_operator = true 492 | ij_actionscript_spaces_around_assignment_operators = true 493 | ij_actionscript_spaces_around_bitwise_operators = true 494 | ij_actionscript_spaces_around_equality_operators = true 495 | ij_actionscript_spaces_around_logical_operators = true 496 | ij_actionscript_spaces_around_multiplicative_operators = true 497 | ij_actionscript_spaces_around_relational_operators = true 498 | ij_actionscript_spaces_around_shift_operators = true 499 | ij_actionscript_spaces_around_unary_operator = false 500 | ij_actionscript_spaces_within_array_initializer_brackets = false 501 | ij_actionscript_spaces_within_brackets = false 502 | ij_actionscript_spaces_within_catch_parentheses = false 503 | ij_actionscript_spaces_within_for_parentheses = false 504 | ij_actionscript_spaces_within_if_parentheses = false 505 | ij_actionscript_spaces_within_imports = false 506 | ij_actionscript_spaces_within_interpolation_expressions = false 507 | ij_actionscript_spaces_within_method_call_parentheses = false 508 | ij_actionscript_spaces_within_method_parentheses = false 509 | ij_actionscript_spaces_within_object_literal_braces = false 510 | ij_actionscript_spaces_within_object_type_braces = true 511 | ij_actionscript_spaces_within_parentheses = false 512 | ij_actionscript_spaces_within_switch_parentheses = false 513 | ij_actionscript_spaces_within_type_assertion = false 514 | ij_actionscript_spaces_within_union_types = true 515 | ij_actionscript_spaces_within_while_parentheses = false 516 | ij_actionscript_special_else_if_treatment = true 517 | ij_actionscript_ternary_operation_signs_on_next_line = true 518 | ij_actionscript_ternary_operation_wrap = normal 519 | ij_actionscript_union_types_wrap = on_every_item 520 | ij_actionscript_use_chained_calls_group_indents = false 521 | ij_actionscript_use_double_quotes = true 522 | ij_actionscript_use_explicit_js_extension = global 523 | ij_actionscript_use_path_mapping = always 524 | ij_actionscript_use_public_modifier = false 525 | ij_actionscript_use_semicolon_after_statement = true 526 | ij_actionscript_var_declaration_wrap = normal 527 | ij_actionscript_while_brace_force = always 528 | ij_actionscript_while_on_new_line = false 529 | ij_actionscript_wrap_comments = false 530 | 531 | [{*.ats,*.ts}] 532 | ij_typescript_align_imports = false 533 | ij_typescript_align_multiline_array_initializer_expression = false 534 | ij_typescript_align_multiline_binary_operation = false 535 | ij_typescript_align_multiline_chained_methods = false 536 | ij_typescript_align_multiline_extends_list = false 537 | ij_typescript_align_multiline_for = true 538 | ij_typescript_align_multiline_parameters = true 539 | ij_typescript_align_multiline_parameters_in_calls = false 540 | ij_typescript_align_multiline_ternary_operation = false 541 | ij_typescript_align_object_properties = 0 542 | ij_typescript_align_union_types = false 543 | ij_typescript_align_var_statements = 0 544 | ij_typescript_array_initializer_new_line_after_left_brace = false 545 | ij_typescript_array_initializer_right_brace_on_new_line = false 546 | ij_typescript_array_initializer_wrap = off 547 | ij_typescript_assignment_wrap = off 548 | ij_typescript_binary_operation_sign_on_next_line = false 549 | ij_typescript_binary_operation_wrap = off 550 | ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**/*, @angular/material, @angular/material/typings/** 551 | ij_typescript_blank_lines_after_imports = 1 552 | ij_typescript_blank_lines_around_class = 1 553 | ij_typescript_blank_lines_around_field = 0 554 | ij_typescript_blank_lines_around_field_in_interface = 0 555 | ij_typescript_blank_lines_around_function = 1 556 | ij_typescript_blank_lines_around_method = 1 557 | ij_typescript_blank_lines_around_method_in_interface = 1 558 | ij_typescript_block_brace_style = end_of_line 559 | ij_typescript_call_parameters_new_line_after_left_paren = false 560 | ij_typescript_call_parameters_right_paren_on_new_line = false 561 | ij_typescript_call_parameters_wrap = off 562 | ij_typescript_catch_on_new_line = false 563 | ij_typescript_chained_call_dot_on_new_line = true 564 | ij_typescript_class_brace_style = end_of_line 565 | ij_typescript_comma_on_new_line = false 566 | ij_typescript_do_while_brace_force = never 567 | ij_typescript_else_on_new_line = false 568 | ij_typescript_enforce_trailing_comma = keep 569 | ij_typescript_extends_keyword_wrap = off 570 | ij_typescript_extends_list_wrap = off 571 | ij_typescript_field_prefix = _ 572 | ij_typescript_file_name_style = relaxed 573 | ij_typescript_finally_on_new_line = false 574 | ij_typescript_for_brace_force = never 575 | ij_typescript_for_statement_new_line_after_left_paren = false 576 | ij_typescript_for_statement_right_paren_on_new_line = false 577 | ij_typescript_for_statement_wrap = off 578 | ij_typescript_force_quote_style = false 579 | ij_typescript_force_semicolon_style = false 580 | ij_typescript_function_expression_brace_style = end_of_line 581 | ij_typescript_if_brace_force = never 582 | ij_typescript_import_merge_members = global 583 | ij_typescript_import_prefer_absolute_path = global 584 | ij_typescript_import_sort_members = true 585 | ij_typescript_import_sort_module_name = false 586 | ij_typescript_import_use_node_resolution = true 587 | ij_typescript_imports_wrap = on_every_item 588 | ij_typescript_indent_case_from_switch = true 589 | ij_typescript_indent_chained_calls = false 590 | ij_typescript_indent_package_children = 0 591 | ij_typescript_jsdoc_include_types = false 592 | ij_typescript_jsx_attribute_value = braces 593 | ij_typescript_keep_blank_lines_in_code = 2 594 | ij_typescript_keep_first_column_comment = true 595 | ij_typescript_keep_indents_on_empty_lines = false 596 | ij_typescript_keep_line_breaks = true 597 | ij_typescript_keep_simple_blocks_in_one_line = false 598 | ij_typescript_keep_simple_methods_in_one_line = false 599 | ij_typescript_line_comment_add_space = true 600 | ij_typescript_line_comment_at_first_column = false 601 | ij_typescript_method_brace_style = end_of_line 602 | ij_typescript_method_call_chain_wrap = off 603 | ij_typescript_method_parameters_new_line_after_left_paren = false 604 | ij_typescript_method_parameters_right_paren_on_new_line = false 605 | ij_typescript_method_parameters_wrap = off 606 | ij_typescript_object_literal_wrap = on_every_item 607 | ij_typescript_parentheses_expression_new_line_after_left_paren = false 608 | ij_typescript_parentheses_expression_right_paren_on_new_line = false 609 | ij_typescript_place_assignment_sign_on_next_line = false 610 | ij_typescript_prefer_as_type_cast = false 611 | ij_typescript_prefer_parameters_wrap = false 612 | ij_typescript_reformat_c_style_comments = false 613 | ij_typescript_space_after_colon = true 614 | ij_typescript_space_after_comma = true 615 | ij_typescript_space_after_dots_in_rest_parameter = false 616 | ij_typescript_space_after_generator_mult = true 617 | ij_typescript_space_after_property_colon = true 618 | ij_typescript_space_after_quest = true 619 | ij_typescript_space_after_type_colon = true 620 | ij_typescript_space_after_unary_not = false 621 | ij_typescript_space_before_async_arrow_lparen = true 622 | ij_typescript_space_before_catch_keyword = true 623 | ij_typescript_space_before_catch_left_brace = true 624 | ij_typescript_space_before_catch_parentheses = true 625 | ij_typescript_space_before_class_lbrace = true 626 | ij_typescript_space_before_class_left_brace = true 627 | ij_typescript_space_before_colon = true 628 | ij_typescript_space_before_comma = false 629 | ij_typescript_space_before_do_left_brace = true 630 | ij_typescript_space_before_else_keyword = true 631 | ij_typescript_space_before_else_left_brace = true 632 | ij_typescript_space_before_finally_keyword = true 633 | ij_typescript_space_before_finally_left_brace = true 634 | ij_typescript_space_before_for_left_brace = true 635 | ij_typescript_space_before_for_parentheses = true 636 | ij_typescript_space_before_for_semicolon = false 637 | ij_typescript_space_before_function_left_parenth = true 638 | ij_typescript_space_before_generator_mult = false 639 | ij_typescript_space_before_if_left_brace = true 640 | ij_typescript_space_before_if_parentheses = true 641 | ij_typescript_space_before_method_call_parentheses = false 642 | ij_typescript_space_before_method_left_brace = true 643 | ij_typescript_space_before_method_parentheses = false 644 | ij_typescript_space_before_property_colon = false 645 | ij_typescript_space_before_quest = true 646 | ij_typescript_space_before_switch_left_brace = true 647 | ij_typescript_space_before_switch_parentheses = true 648 | ij_typescript_space_before_try_left_brace = true 649 | ij_typescript_space_before_type_colon = false 650 | ij_typescript_space_before_unary_not = false 651 | ij_typescript_space_before_while_keyword = true 652 | ij_typescript_space_before_while_left_brace = true 653 | ij_typescript_space_before_while_parentheses = true 654 | ij_typescript_spaces_around_additive_operators = true 655 | ij_typescript_spaces_around_arrow_function_operator = true 656 | ij_typescript_spaces_around_assignment_operators = true 657 | ij_typescript_spaces_around_bitwise_operators = true 658 | ij_typescript_spaces_around_equality_operators = true 659 | ij_typescript_spaces_around_logical_operators = true 660 | ij_typescript_spaces_around_multiplicative_operators = true 661 | ij_typescript_spaces_around_relational_operators = true 662 | ij_typescript_spaces_around_shift_operators = true 663 | ij_typescript_spaces_around_unary_operator = false 664 | ij_typescript_spaces_within_array_initializer_brackets = false 665 | ij_typescript_spaces_within_brackets = false 666 | ij_typescript_spaces_within_catch_parentheses = false 667 | ij_typescript_spaces_within_for_parentheses = false 668 | ij_typescript_spaces_within_if_parentheses = false 669 | ij_typescript_spaces_within_imports = false 670 | ij_typescript_spaces_within_interpolation_expressions = false 671 | ij_typescript_spaces_within_method_call_parentheses = false 672 | ij_typescript_spaces_within_method_parentheses = false 673 | ij_typescript_spaces_within_object_literal_braces = false 674 | ij_typescript_spaces_within_object_type_braces = true 675 | ij_typescript_spaces_within_parentheses = false 676 | ij_typescript_spaces_within_switch_parentheses = false 677 | ij_typescript_spaces_within_type_assertion = false 678 | ij_typescript_spaces_within_union_types = true 679 | ij_typescript_spaces_within_while_parentheses = false 680 | ij_typescript_special_else_if_treatment = true 681 | ij_typescript_ternary_operation_signs_on_next_line = false 682 | ij_typescript_ternary_operation_wrap = off 683 | ij_typescript_union_types_wrap = on_every_item 684 | ij_typescript_use_chained_calls_group_indents = false 685 | ij_typescript_use_double_quotes = true 686 | ij_typescript_use_explicit_js_extension = global 687 | ij_typescript_use_path_mapping = always 688 | ij_typescript_use_public_modifier = false 689 | ij_typescript_use_semicolon_after_statement = true 690 | ij_typescript_var_declaration_wrap = normal 691 | ij_typescript_while_brace_force = never 692 | ij_typescript_while_on_new_line = false 693 | ij_typescript_wrap_comments = false 694 | 695 | [{*.cfml,*.cfm,*.cfc}] 696 | indent_size = 4 697 | tab_width = 4 698 | ij_continuation_indent_size = 8 699 | ij_cfml_align_multiline_binary_operation = false 700 | ij_cfml_align_multiline_for = true 701 | ij_cfml_align_multiline_parameters = true 702 | ij_cfml_align_multiline_parameters_in_calls = false 703 | ij_cfml_align_multiline_ternary_operation = false 704 | ij_cfml_assignment_wrap = off 705 | ij_cfml_binary_operation_sign_on_next_line = false 706 | ij_cfml_binary_operation_wrap = off 707 | ij_cfml_block_brace_style = end_of_line 708 | ij_cfml_call_parameters_new_line_after_left_paren = false 709 | ij_cfml_call_parameters_right_paren_on_new_line = false 710 | ij_cfml_call_parameters_wrap = off 711 | ij_cfml_catch_on_new_line = false 712 | ij_cfml_else_on_new_line = false 713 | ij_cfml_for_statement_new_line_after_left_paren = false 714 | ij_cfml_for_statement_right_paren_on_new_line = false 715 | ij_cfml_for_statement_wrap = off 716 | ij_cfml_keep_blank_lines_in_code = 2 717 | ij_cfml_keep_first_column_comment = true 718 | ij_cfml_keep_indents_on_empty_lines = false 719 | ij_cfml_keep_line_breaks = true 720 | ij_cfml_method_brace_style = next_line 721 | ij_cfml_method_parameters_new_line_after_left_paren = false 722 | ij_cfml_method_parameters_right_paren_on_new_line = false 723 | ij_cfml_method_parameters_wrap = off 724 | ij_cfml_parentheses_expression_new_line_after_left_paren = false 725 | ij_cfml_parentheses_expression_right_paren_on_new_line = false 726 | ij_cfml_place_assignment_sign_on_next_line = false 727 | ij_cfml_space_after_colon = true 728 | ij_cfml_space_after_comma = true 729 | ij_cfml_space_after_for_semicolon = true 730 | ij_cfml_space_after_quest = true 731 | ij_cfml_space_before_catch_keyword = true 732 | ij_cfml_space_before_catch_left_brace = true 733 | ij_cfml_space_before_catch_parentheses = true 734 | ij_cfml_space_before_colon = true 735 | ij_cfml_space_before_comma = false 736 | ij_cfml_space_before_else_keyword = true 737 | ij_cfml_space_before_else_left_brace = true 738 | ij_cfml_space_before_for_left_brace = true 739 | ij_cfml_space_before_for_parentheses = true 740 | ij_cfml_space_before_for_semicolon = false 741 | ij_cfml_space_before_if_left_brace = true 742 | ij_cfml_space_before_if_parentheses = true 743 | ij_cfml_space_before_method_call_parentheses = false 744 | ij_cfml_space_before_method_left_brace = true 745 | ij_cfml_space_before_method_parentheses = false 746 | ij_cfml_space_before_quest = true 747 | ij_cfml_space_before_switch_left_brace = true 748 | ij_cfml_space_before_switch_parentheses = true 749 | ij_cfml_space_before_try_left_brace = true 750 | ij_cfml_space_before_while_keyword = true 751 | ij_cfml_space_before_while_left_brace = true 752 | ij_cfml_space_before_while_parentheses = true 753 | ij_cfml_spaces_around_additive_operators = true 754 | ij_cfml_spaces_around_assignment_operators = true 755 | ij_cfml_spaces_around_equality_operators = true 756 | ij_cfml_spaces_around_logical_operators = true 757 | ij_cfml_spaces_around_multiplicative_operators = true 758 | ij_cfml_spaces_around_relational_operators = true 759 | ij_cfml_spaces_around_unary_operator = false 760 | ij_cfml_spaces_within_catch_parentheses = false 761 | ij_cfml_spaces_within_for_parentheses = false 762 | ij_cfml_spaces_within_if_parentheses = false 763 | ij_cfml_spaces_within_method_call_parentheses = false 764 | ij_cfml_spaces_within_method_parentheses = false 765 | ij_cfml_spaces_within_switch_parentheses = false 766 | ij_cfml_spaces_within_while_parentheses = false 767 | ij_cfml_special_else_if_treatment = false 768 | ij_cfml_ternary_operation_signs_on_next_line = false 769 | ij_cfml_ternary_operation_wrap = off 770 | ij_cfml_while_on_new_line = false 771 | 772 | [{*.cjs,*.js}] 773 | max_line_length = 80 774 | ij_javascript_align_imports = false 775 | ij_javascript_align_multiline_array_initializer_expression = false 776 | ij_javascript_align_multiline_binary_operation = false 777 | ij_javascript_align_multiline_chained_methods = false 778 | ij_javascript_align_multiline_extends_list = false 779 | ij_javascript_align_multiline_for = false 780 | ij_javascript_align_multiline_parameters = false 781 | ij_javascript_align_multiline_parameters_in_calls = false 782 | ij_javascript_align_multiline_ternary_operation = false 783 | ij_javascript_align_object_properties = 0 784 | ij_javascript_align_union_types = false 785 | ij_javascript_align_var_statements = 0 786 | ij_javascript_array_initializer_new_line_after_left_brace = false 787 | ij_javascript_array_initializer_right_brace_on_new_line = false 788 | ij_javascript_array_initializer_wrap = normal 789 | ij_javascript_assignment_wrap = off 790 | ij_javascript_binary_operation_sign_on_next_line = true 791 | ij_javascript_binary_operation_wrap = normal 792 | ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**/*, @angular/material, @angular/material/typings/** 793 | ij_javascript_blank_lines_after_imports = 1 794 | ij_javascript_blank_lines_around_class = 1 795 | ij_javascript_blank_lines_around_field = 0 796 | ij_javascript_blank_lines_around_function = 1 797 | ij_javascript_blank_lines_around_method = 1 798 | ij_javascript_block_brace_style = end_of_line 799 | ij_javascript_call_parameters_new_line_after_left_paren = false 800 | ij_javascript_call_parameters_right_paren_on_new_line = false 801 | ij_javascript_call_parameters_wrap = normal 802 | ij_javascript_catch_on_new_line = false 803 | ij_javascript_chained_call_dot_on_new_line = true 804 | ij_javascript_class_brace_style = end_of_line 805 | ij_javascript_comma_on_new_line = false 806 | ij_javascript_do_while_brace_force = always 807 | ij_javascript_else_on_new_line = false 808 | ij_javascript_enforce_trailing_comma = keep 809 | ij_javascript_extends_keyword_wrap = off 810 | ij_javascript_extends_list_wrap = off 811 | ij_javascript_field_prefix = _ 812 | ij_javascript_file_name_style = relaxed 813 | ij_javascript_finally_on_new_line = false 814 | ij_javascript_for_brace_force = always 815 | ij_javascript_for_statement_new_line_after_left_paren = false 816 | ij_javascript_for_statement_right_paren_on_new_line = false 817 | ij_javascript_for_statement_wrap = normal 818 | ij_javascript_force_quote_style = false 819 | ij_javascript_force_semicolon_style = false 820 | ij_javascript_function_expression_brace_style = end_of_line 821 | ij_javascript_if_brace_force = always 822 | ij_javascript_import_merge_members = global 823 | ij_javascript_import_prefer_absolute_path = global 824 | ij_javascript_import_sort_members = true 825 | ij_javascript_import_sort_module_name = false 826 | ij_javascript_import_use_node_resolution = true 827 | ij_javascript_imports_wrap = on_every_item 828 | ij_javascript_indent_case_from_switch = true 829 | ij_javascript_indent_chained_calls = false 830 | ij_javascript_indent_package_children = 0 831 | ij_javascript_jsx_attribute_value = braces 832 | ij_javascript_keep_blank_lines_in_code = 1 833 | ij_javascript_keep_first_column_comment = true 834 | ij_javascript_keep_indents_on_empty_lines = false 835 | ij_javascript_keep_line_breaks = true 836 | ij_javascript_keep_simple_blocks_in_one_line = false 837 | ij_javascript_keep_simple_methods_in_one_line = false 838 | ij_javascript_line_comment_add_space = true 839 | ij_javascript_line_comment_at_first_column = false 840 | ij_javascript_method_brace_style = end_of_line 841 | ij_javascript_method_call_chain_wrap = off 842 | ij_javascript_method_parameters_new_line_after_left_paren = false 843 | ij_javascript_method_parameters_right_paren_on_new_line = false 844 | ij_javascript_method_parameters_wrap = normal 845 | ij_javascript_object_literal_wrap = on_every_item 846 | ij_javascript_parentheses_expression_new_line_after_left_paren = false 847 | ij_javascript_parentheses_expression_right_paren_on_new_line = false 848 | ij_javascript_place_assignment_sign_on_next_line = false 849 | ij_javascript_prefer_as_type_cast = false 850 | ij_javascript_prefer_parameters_wrap = false 851 | ij_javascript_reformat_c_style_comments = false 852 | ij_javascript_space_after_colon = true 853 | ij_javascript_space_after_comma = true 854 | ij_javascript_space_after_dots_in_rest_parameter = false 855 | ij_javascript_space_after_generator_mult = true 856 | ij_javascript_space_after_property_colon = true 857 | ij_javascript_space_after_quest = true 858 | ij_javascript_space_after_type_colon = true 859 | ij_javascript_space_after_unary_not = false 860 | ij_javascript_space_before_async_arrow_lparen = true 861 | ij_javascript_space_before_catch_keyword = true 862 | ij_javascript_space_before_catch_left_brace = true 863 | ij_javascript_space_before_catch_parentheses = true 864 | ij_javascript_space_before_class_lbrace = true 865 | ij_javascript_space_before_class_left_brace = true 866 | ij_javascript_space_before_colon = true 867 | ij_javascript_space_before_comma = false 868 | ij_javascript_space_before_do_left_brace = true 869 | ij_javascript_space_before_else_keyword = true 870 | ij_javascript_space_before_else_left_brace = true 871 | ij_javascript_space_before_finally_keyword = true 872 | ij_javascript_space_before_finally_left_brace = true 873 | ij_javascript_space_before_for_left_brace = true 874 | ij_javascript_space_before_for_parentheses = true 875 | ij_javascript_space_before_for_semicolon = false 876 | ij_javascript_space_before_function_left_parenth = true 877 | ij_javascript_space_before_generator_mult = false 878 | ij_javascript_space_before_if_left_brace = true 879 | ij_javascript_space_before_if_parentheses = true 880 | ij_javascript_space_before_method_call_parentheses = false 881 | ij_javascript_space_before_method_left_brace = true 882 | ij_javascript_space_before_method_parentheses = false 883 | ij_javascript_space_before_property_colon = false 884 | ij_javascript_space_before_quest = true 885 | ij_javascript_space_before_switch_left_brace = true 886 | ij_javascript_space_before_switch_parentheses = true 887 | ij_javascript_space_before_try_left_brace = true 888 | ij_javascript_space_before_type_colon = false 889 | ij_javascript_space_before_unary_not = false 890 | ij_javascript_space_before_while_keyword = true 891 | ij_javascript_space_before_while_left_brace = true 892 | ij_javascript_space_before_while_parentheses = true 893 | ij_javascript_spaces_around_additive_operators = true 894 | ij_javascript_spaces_around_arrow_function_operator = true 895 | ij_javascript_spaces_around_assignment_operators = true 896 | ij_javascript_spaces_around_bitwise_operators = true 897 | ij_javascript_spaces_around_equality_operators = true 898 | ij_javascript_spaces_around_logical_operators = true 899 | ij_javascript_spaces_around_multiplicative_operators = true 900 | ij_javascript_spaces_around_relational_operators = true 901 | ij_javascript_spaces_around_shift_operators = true 902 | ij_javascript_spaces_around_unary_operator = false 903 | ij_javascript_spaces_within_array_initializer_brackets = false 904 | ij_javascript_spaces_within_brackets = false 905 | ij_javascript_spaces_within_catch_parentheses = false 906 | ij_javascript_spaces_within_for_parentheses = false 907 | ij_javascript_spaces_within_if_parentheses = false 908 | ij_javascript_spaces_within_imports = false 909 | ij_javascript_spaces_within_interpolation_expressions = false 910 | ij_javascript_spaces_within_method_call_parentheses = false 911 | ij_javascript_spaces_within_method_parentheses = false 912 | ij_javascript_spaces_within_object_literal_braces = false 913 | ij_javascript_spaces_within_object_type_braces = true 914 | ij_javascript_spaces_within_parentheses = false 915 | ij_javascript_spaces_within_switch_parentheses = false 916 | ij_javascript_spaces_within_type_assertion = false 917 | ij_javascript_spaces_within_union_types = true 918 | ij_javascript_spaces_within_while_parentheses = false 919 | ij_javascript_special_else_if_treatment = true 920 | ij_javascript_ternary_operation_signs_on_next_line = true 921 | ij_javascript_ternary_operation_wrap = normal 922 | ij_javascript_union_types_wrap = on_every_item 923 | ij_javascript_use_chained_calls_group_indents = false 924 | ij_javascript_use_double_quotes = true 925 | ij_javascript_use_explicit_js_extension = global 926 | ij_javascript_use_path_mapping = always 927 | ij_javascript_use_public_modifier = false 928 | ij_javascript_use_semicolon_after_statement = true 929 | ij_javascript_var_declaration_wrap = normal 930 | ij_javascript_while_brace_force = always 931 | ij_javascript_while_on_new_line = false 932 | ij_javascript_wrap_comments = false 933 | 934 | [{*.cjsx,*.coffee}] 935 | ij_continuation_indent_size = 2 936 | ij_coffeescript_align_function_body = false 937 | ij_coffeescript_align_imports = false 938 | ij_coffeescript_align_multiline_array_initializer_expression = true 939 | ij_coffeescript_align_multiline_parameters = true 940 | ij_coffeescript_align_multiline_parameters_in_calls = false 941 | ij_coffeescript_align_object_properties = 0 942 | ij_coffeescript_align_union_types = false 943 | ij_coffeescript_align_var_statements = 0 944 | ij_coffeescript_array_initializer_new_line_after_left_brace = false 945 | ij_coffeescript_array_initializer_right_brace_on_new_line = false 946 | ij_coffeescript_array_initializer_wrap = normal 947 | ij_coffeescript_blacklist_imports = rxjs/Rx, node_modules/**/*, @angular/material, @angular/material/typings/** 948 | ij_coffeescript_blank_lines_around_function = 1 949 | ij_coffeescript_call_parameters_new_line_after_left_paren = false 950 | ij_coffeescript_call_parameters_right_paren_on_new_line = false 951 | ij_coffeescript_call_parameters_wrap = normal 952 | ij_coffeescript_chained_call_dot_on_new_line = true 953 | ij_coffeescript_comma_on_new_line = false 954 | ij_coffeescript_enforce_trailing_comma = keep 955 | ij_coffeescript_field_prefix = _ 956 | ij_coffeescript_file_name_style = relaxed 957 | ij_coffeescript_force_quote_style = false 958 | ij_coffeescript_force_semicolon_style = false 959 | ij_coffeescript_function_expression_brace_style = end_of_line 960 | ij_coffeescript_import_merge_members = global 961 | ij_coffeescript_import_prefer_absolute_path = global 962 | ij_coffeescript_import_sort_members = true 963 | ij_coffeescript_import_sort_module_name = false 964 | ij_coffeescript_import_use_node_resolution = true 965 | ij_coffeescript_imports_wrap = on_every_item 966 | ij_coffeescript_indent_chained_calls = true 967 | ij_coffeescript_indent_package_children = 0 968 | ij_coffeescript_jsx_attribute_value = braces 969 | ij_coffeescript_keep_blank_lines_in_code = 2 970 | ij_coffeescript_keep_first_column_comment = true 971 | ij_coffeescript_keep_indents_on_empty_lines = false 972 | ij_coffeescript_keep_line_breaks = true 973 | ij_coffeescript_keep_simple_methods_in_one_line = false 974 | ij_coffeescript_method_parameters_new_line_after_left_paren = false 975 | ij_coffeescript_method_parameters_right_paren_on_new_line = false 976 | ij_coffeescript_method_parameters_wrap = off 977 | ij_coffeescript_object_literal_wrap = on_every_item 978 | ij_coffeescript_prefer_as_type_cast = false 979 | ij_coffeescript_reformat_c_style_comments = false 980 | ij_coffeescript_space_after_comma = true 981 | ij_coffeescript_space_after_dots_in_rest_parameter = false 982 | ij_coffeescript_space_after_generator_mult = true 983 | ij_coffeescript_space_after_property_colon = true 984 | ij_coffeescript_space_after_type_colon = true 985 | ij_coffeescript_space_after_unary_not = false 986 | ij_coffeescript_space_before_async_arrow_lparen = true 987 | ij_coffeescript_space_before_class_lbrace = true 988 | ij_coffeescript_space_before_comma = false 989 | ij_coffeescript_space_before_function_left_parenth = true 990 | ij_coffeescript_space_before_generator_mult = false 991 | ij_coffeescript_space_before_property_colon = false 992 | ij_coffeescript_space_before_type_colon = false 993 | ij_coffeescript_space_before_unary_not = false 994 | ij_coffeescript_spaces_around_additive_operators = true 995 | ij_coffeescript_spaces_around_arrow_function_operator = true 996 | ij_coffeescript_spaces_around_assignment_operators = true 997 | ij_coffeescript_spaces_around_bitwise_operators = true 998 | ij_coffeescript_spaces_around_equality_operators = true 999 | ij_coffeescript_spaces_around_logical_operators = true 1000 | ij_coffeescript_spaces_around_multiplicative_operators = true 1001 | ij_coffeescript_spaces_around_relational_operators = true 1002 | ij_coffeescript_spaces_around_shift_operators = true 1003 | ij_coffeescript_spaces_around_unary_operator = false 1004 | ij_coffeescript_spaces_within_array_initializer_braces = false 1005 | ij_coffeescript_spaces_within_array_initializer_brackets = false 1006 | ij_coffeescript_spaces_within_imports = false 1007 | ij_coffeescript_spaces_within_index_brackets = false 1008 | ij_coffeescript_spaces_within_interpolation_expressions = false 1009 | ij_coffeescript_spaces_within_method_call_parentheses = false 1010 | ij_coffeescript_spaces_within_method_parentheses = false 1011 | ij_coffeescript_spaces_within_object_braces = false 1012 | ij_coffeescript_spaces_within_object_literal_braces = false 1013 | ij_coffeescript_spaces_within_object_type_braces = true 1014 | ij_coffeescript_spaces_within_range_brackets = false 1015 | ij_coffeescript_spaces_within_type_assertion = false 1016 | ij_coffeescript_spaces_within_union_types = true 1017 | ij_coffeescript_union_types_wrap = on_every_item 1018 | ij_coffeescript_use_chained_calls_group_indents = false 1019 | ij_coffeescript_use_double_quotes = true 1020 | ij_coffeescript_use_explicit_js_extension = global 1021 | ij_coffeescript_use_path_mapping = always 1022 | ij_coffeescript_use_public_modifier = false 1023 | ij_coffeescript_use_semicolon_after_statement = false 1024 | ij_coffeescript_var_declaration_wrap = normal 1025 | 1026 | [{*.gradle,*.groovy,*.gant,*.gdsl,*.gy,*.gson}] 1027 | indent_size = 4 1028 | tab_width = 4 1029 | ij_continuation_indent_size = 8 1030 | ij_groovy_align_group_field_declarations = false 1031 | ij_groovy_align_multiline_array_initializer_expression = false 1032 | ij_groovy_align_multiline_assignment = false 1033 | ij_groovy_align_multiline_binary_operation = false 1034 | ij_groovy_align_multiline_chained_methods = false 1035 | ij_groovy_align_multiline_extends_list = false 1036 | ij_groovy_align_multiline_for = true 1037 | ij_groovy_align_multiline_method_parentheses = false 1038 | ij_groovy_align_multiline_parameters = true 1039 | ij_groovy_align_multiline_parameters_in_calls = false 1040 | ij_groovy_align_multiline_resources = true 1041 | ij_groovy_align_multiline_ternary_operation = false 1042 | ij_groovy_align_multiline_throws_list = false 1043 | ij_groovy_align_throws_keyword = false 1044 | ij_groovy_array_initializer_new_line_after_left_brace = false 1045 | ij_groovy_array_initializer_right_brace_on_new_line = false 1046 | ij_groovy_array_initializer_wrap = off 1047 | ij_groovy_assert_statement_wrap = off 1048 | ij_groovy_assignment_wrap = off 1049 | ij_groovy_binary_operation_wrap = off 1050 | ij_groovy_blank_lines_after_class_header = 0 1051 | ij_groovy_blank_lines_after_imports = 1 1052 | ij_groovy_blank_lines_after_package = 1 1053 | ij_groovy_blank_lines_around_class = 1 1054 | ij_groovy_blank_lines_around_field = 0 1055 | ij_groovy_blank_lines_around_field_in_interface = 0 1056 | ij_groovy_blank_lines_around_method = 1 1057 | ij_groovy_blank_lines_around_method_in_interface = 1 1058 | ij_groovy_blank_lines_before_imports = 1 1059 | ij_groovy_blank_lines_before_method_body = 0 1060 | ij_groovy_blank_lines_before_package = 0 1061 | ij_groovy_block_brace_style = end_of_line 1062 | ij_groovy_block_comment_at_first_column = true 1063 | ij_groovy_call_parameters_new_line_after_left_paren = false 1064 | ij_groovy_call_parameters_right_paren_on_new_line = false 1065 | ij_groovy_call_parameters_wrap = off 1066 | ij_groovy_catch_on_new_line = false 1067 | ij_groovy_class_annotation_wrap = split_into_lines 1068 | ij_groovy_class_brace_style = end_of_line 1069 | ij_groovy_do_while_brace_force = never 1070 | ij_groovy_else_on_new_line = false 1071 | ij_groovy_enum_constants_wrap = off 1072 | ij_groovy_extends_keyword_wrap = off 1073 | ij_groovy_extends_list_wrap = off 1074 | ij_groovy_field_annotation_wrap = split_into_lines 1075 | ij_groovy_finally_on_new_line = false 1076 | ij_groovy_for_brace_force = never 1077 | ij_groovy_for_statement_new_line_after_left_paren = false 1078 | ij_groovy_for_statement_right_paren_on_new_line = false 1079 | ij_groovy_for_statement_wrap = off 1080 | ij_groovy_if_brace_force = never 1081 | ij_groovy_indent_case_from_switch = true 1082 | ij_groovy_keep_blank_lines_before_right_brace = 2 1083 | ij_groovy_keep_blank_lines_in_code = 2 1084 | ij_groovy_keep_blank_lines_in_declarations = 2 1085 | ij_groovy_keep_control_statement_in_one_line = true 1086 | ij_groovy_keep_first_column_comment = true 1087 | ij_groovy_keep_indents_on_empty_lines = false 1088 | ij_groovy_keep_line_breaks = true 1089 | ij_groovy_keep_multiple_expressions_in_one_line = false 1090 | ij_groovy_keep_simple_blocks_in_one_line = false 1091 | ij_groovy_keep_simple_classes_in_one_line = true 1092 | ij_groovy_keep_simple_lambdas_in_one_line = true 1093 | ij_groovy_keep_simple_methods_in_one_line = true 1094 | ij_groovy_lambda_brace_style = end_of_line 1095 | ij_groovy_line_comment_add_space = false 1096 | ij_groovy_line_comment_at_first_column = true 1097 | ij_groovy_method_annotation_wrap = split_into_lines 1098 | ij_groovy_method_brace_style = end_of_line 1099 | ij_groovy_method_call_chain_wrap = off 1100 | ij_groovy_method_parameters_new_line_after_left_paren = false 1101 | ij_groovy_method_parameters_right_paren_on_new_line = false 1102 | ij_groovy_method_parameters_wrap = off 1103 | ij_groovy_modifier_list_wrap = false 1104 | ij_groovy_parameter_annotation_wrap = off 1105 | ij_groovy_parentheses_expression_new_line_after_left_paren = false 1106 | ij_groovy_parentheses_expression_right_paren_on_new_line = false 1107 | ij_groovy_prefer_parameters_wrap = false 1108 | ij_groovy_resource_list_new_line_after_left_paren = false 1109 | ij_groovy_resource_list_right_paren_on_new_line = false 1110 | ij_groovy_resource_list_wrap = off 1111 | ij_groovy_space_after_colon = true 1112 | ij_groovy_space_after_comma = true 1113 | ij_groovy_space_after_comma_in_type_arguments = true 1114 | ij_groovy_space_after_for_semicolon = true 1115 | ij_groovy_space_after_quest = true 1116 | ij_groovy_space_after_type_cast = true 1117 | ij_groovy_space_before_annotation_parameter_list = false 1118 | ij_groovy_space_before_array_initializer_left_brace = false 1119 | ij_groovy_space_before_catch_keyword = true 1120 | ij_groovy_space_before_catch_left_brace = true 1121 | ij_groovy_space_before_catch_parentheses = true 1122 | ij_groovy_space_before_class_left_brace = true 1123 | ij_groovy_space_before_colon = true 1124 | ij_groovy_space_before_comma = false 1125 | ij_groovy_space_before_do_left_brace = true 1126 | ij_groovy_space_before_else_keyword = true 1127 | ij_groovy_space_before_else_left_brace = true 1128 | ij_groovy_space_before_finally_keyword = true 1129 | ij_groovy_space_before_finally_left_brace = true 1130 | ij_groovy_space_before_for_left_brace = true 1131 | ij_groovy_space_before_for_parentheses = true 1132 | ij_groovy_space_before_for_semicolon = false 1133 | ij_groovy_space_before_if_left_brace = true 1134 | ij_groovy_space_before_if_parentheses = true 1135 | ij_groovy_space_before_method_call_parentheses = false 1136 | ij_groovy_space_before_method_left_brace = true 1137 | ij_groovy_space_before_method_parentheses = false 1138 | ij_groovy_space_before_quest = true 1139 | ij_groovy_space_before_switch_left_brace = true 1140 | ij_groovy_space_before_switch_parentheses = true 1141 | ij_groovy_space_before_synchronized_left_brace = true 1142 | ij_groovy_space_before_synchronized_parentheses = true 1143 | ij_groovy_space_before_try_left_brace = true 1144 | ij_groovy_space_before_try_parentheses = true 1145 | ij_groovy_space_before_while_keyword = true 1146 | ij_groovy_space_before_while_left_brace = true 1147 | ij_groovy_space_before_while_parentheses = true 1148 | ij_groovy_space_within_empty_array_initializer_braces = false 1149 | ij_groovy_space_within_empty_method_call_parentheses = false 1150 | ij_groovy_spaces_around_additive_operators = true 1151 | ij_groovy_spaces_around_assignment_operators = true 1152 | ij_groovy_spaces_around_bitwise_operators = true 1153 | ij_groovy_spaces_around_equality_operators = true 1154 | ij_groovy_spaces_around_lambda_arrow = true 1155 | ij_groovy_spaces_around_logical_operators = true 1156 | ij_groovy_spaces_around_multiplicative_operators = true 1157 | ij_groovy_spaces_around_relational_operators = true 1158 | ij_groovy_spaces_around_shift_operators = true 1159 | ij_groovy_spaces_within_annotation_parentheses = false 1160 | ij_groovy_spaces_within_array_initializer_braces = false 1161 | ij_groovy_spaces_within_braces = true 1162 | ij_groovy_spaces_within_brackets = false 1163 | ij_groovy_spaces_within_cast_parentheses = false 1164 | ij_groovy_spaces_within_catch_parentheses = false 1165 | ij_groovy_spaces_within_for_parentheses = false 1166 | ij_groovy_spaces_within_if_parentheses = false 1167 | ij_groovy_spaces_within_method_call_parentheses = false 1168 | ij_groovy_spaces_within_method_parentheses = false 1169 | ij_groovy_spaces_within_parentheses = false 1170 | ij_groovy_spaces_within_switch_parentheses = false 1171 | ij_groovy_spaces_within_synchronized_parentheses = false 1172 | ij_groovy_spaces_within_try_parentheses = false 1173 | ij_groovy_spaces_within_while_parentheses = false 1174 | ij_groovy_special_else_if_treatment = true 1175 | ij_groovy_ternary_operation_wrap = off 1176 | ij_groovy_throws_keyword_wrap = off 1177 | ij_groovy_throws_list_wrap = off 1178 | ij_groovy_variable_annotation_wrap = off 1179 | ij_groovy_while_brace_force = never 1180 | ij_groovy_while_on_new_line = false 1181 | ij_groovy_wrap_long_lines = false 1182 | 1183 | [{*.jhm,*.xjb,*.rng,*.wsdd,*.wsdl,*.fxml,*.bpmn,*.pom,*.xslt,*.jrxml,*.ant,*.xul,*.xsl,*.xsd,*.tld,*.jnlp,*.wadl,*.xml}] 1184 | ij_continuation_indent_size = 2 1185 | ij_xml_block_comment_at_first_column = true 1186 | ij_xml_keep_indents_on_empty_lines = false 1187 | ij_xml_line_comment_at_first_column = true 1188 | 1189 | [{*.jspx,*.tagx}] 1190 | indent_size = 4 1191 | tab_width = 4 1192 | ij_continuation_indent_size = 8 1193 | ij_jspx_keep_indents_on_empty_lines = false 1194 | 1195 | [{*.kts,*.kt}] 1196 | indent_size = 4 1197 | tab_width = 4 1198 | ij_continuation_indent_size = 8 1199 | ij_kotlin_align_in_columns_case_branch = false 1200 | ij_kotlin_align_multiline_binary_operation = false 1201 | ij_kotlin_align_multiline_extends_list = false 1202 | ij_kotlin_align_multiline_method_parentheses = false 1203 | ij_kotlin_align_multiline_parameters = true 1204 | ij_kotlin_align_multiline_parameters_in_calls = false 1205 | ij_kotlin_assignment_wrap = off 1206 | ij_kotlin_blank_lines_after_class_header = 0 1207 | ij_kotlin_blank_lines_around_block_when_branches = 0 1208 | ij_kotlin_block_comment_at_first_column = true 1209 | ij_kotlin_call_parameters_new_line_after_left_paren = false 1210 | ij_kotlin_call_parameters_right_paren_on_new_line = false 1211 | ij_kotlin_call_parameters_wrap = off 1212 | ij_kotlin_catch_on_new_line = false 1213 | ij_kotlin_class_annotation_wrap = split_into_lines 1214 | ij_kotlin_continuation_indent_for_chained_calls = true 1215 | ij_kotlin_continuation_indent_for_expression_bodies = true 1216 | ij_kotlin_continuation_indent_in_argument_lists = true 1217 | ij_kotlin_continuation_indent_in_elvis = true 1218 | ij_kotlin_continuation_indent_in_if_conditions = true 1219 | ij_kotlin_continuation_indent_in_parameter_lists = true 1220 | ij_kotlin_continuation_indent_in_supertype_lists = true 1221 | ij_kotlin_else_on_new_line = false 1222 | ij_kotlin_enum_constants_wrap = off 1223 | ij_kotlin_extends_list_wrap = off 1224 | ij_kotlin_field_annotation_wrap = split_into_lines 1225 | ij_kotlin_finally_on_new_line = false 1226 | ij_kotlin_if_rparen_on_new_line = false 1227 | ij_kotlin_import_nested_classes = false 1228 | ij_kotlin_insert_whitespaces_in_simple_one_line_method = true 1229 | ij_kotlin_keep_blank_lines_before_right_brace = 2 1230 | ij_kotlin_keep_blank_lines_in_code = 2 1231 | ij_kotlin_keep_blank_lines_in_declarations = 2 1232 | ij_kotlin_keep_first_column_comment = true 1233 | ij_kotlin_keep_indents_on_empty_lines = false 1234 | ij_kotlin_keep_line_breaks = true 1235 | ij_kotlin_lbrace_on_next_line = false 1236 | ij_kotlin_line_comment_add_space = false 1237 | ij_kotlin_line_comment_at_first_column = true 1238 | ij_kotlin_method_annotation_wrap = split_into_lines 1239 | ij_kotlin_method_call_chain_wrap = off 1240 | ij_kotlin_method_parameters_new_line_after_left_paren = false 1241 | ij_kotlin_method_parameters_right_paren_on_new_line = false 1242 | ij_kotlin_method_parameters_wrap = off 1243 | ij_kotlin_name_count_to_use_star_import = 5 1244 | ij_kotlin_name_count_to_use_star_import_for_members = 3 1245 | ij_kotlin_parameter_annotation_wrap = off 1246 | ij_kotlin_space_after_comma = true 1247 | ij_kotlin_space_after_extend_colon = true 1248 | ij_kotlin_space_after_type_colon = true 1249 | ij_kotlin_space_before_catch_parentheses = true 1250 | ij_kotlin_space_before_comma = false 1251 | ij_kotlin_space_before_extend_colon = true 1252 | ij_kotlin_space_before_for_parentheses = true 1253 | ij_kotlin_space_before_if_parentheses = true 1254 | ij_kotlin_space_before_lambda_arrow = true 1255 | ij_kotlin_space_before_type_colon = false 1256 | ij_kotlin_space_before_when_parentheses = true 1257 | ij_kotlin_space_before_while_parentheses = true 1258 | ij_kotlin_spaces_around_additive_operators = true 1259 | ij_kotlin_spaces_around_assignment_operators = true 1260 | ij_kotlin_spaces_around_equality_operators = true 1261 | ij_kotlin_spaces_around_function_type_arrow = true 1262 | ij_kotlin_spaces_around_logical_operators = true 1263 | ij_kotlin_spaces_around_multiplicative_operators = true 1264 | ij_kotlin_spaces_around_range = false 1265 | ij_kotlin_spaces_around_relational_operators = true 1266 | ij_kotlin_spaces_around_unary_operator = false 1267 | ij_kotlin_spaces_around_when_arrow = true 1268 | ij_kotlin_variable_annotation_wrap = off 1269 | ij_kotlin_while_on_new_line = false 1270 | ij_kotlin_wrap_elvis_expressions = 1 1271 | ij_kotlin_wrap_expression_body_functions = 0 1272 | ij_kotlin_wrap_first_method_in_call_chain = false 1273 | 1274 | [{*.sht,*.htm,*.html,*.shtm,*.shtml,*.ng}] 1275 | ij_html_add_new_line_before_tags = body, div, p, form, h1, h2, h3 1276 | ij_html_align_attributes = true 1277 | ij_html_align_text = false 1278 | ij_html_attribute_wrap = normal 1279 | ij_html_block_comment_at_first_column = true 1280 | ij_html_do_not_align_children_of_min_lines = 0 1281 | ij_html_do_not_break_if_inline_tags = title, h1, h2, h3, h4, h5, h6, p 1282 | ij_html_do_not_indent_children_of_tags = html, body, thead, tbody, tfoot 1283 | ij_html_enforce_quotes = false 1284 | ij_html_inline_tags = a, abbr, acronym, b, basefont, bdo, big, br, cite, cite, code, dfn, em, font, i, img, input, kbd, label, q, s, samp, select, small, span, strike, strong, sub, sup, textarea, tt, u, var 1285 | ij_html_keep_blank_lines = 2 1286 | ij_html_keep_indents_on_empty_lines = false 1287 | ij_html_keep_line_breaks = true 1288 | ij_html_keep_line_breaks_in_text = true 1289 | ij_html_keep_whitespaces = false 1290 | ij_html_keep_whitespaces_inside = span, pre, textarea 1291 | ij_html_line_comment_at_first_column = true 1292 | ij_html_new_line_after_last_attribute = never 1293 | ij_html_new_line_before_first_attribute = never 1294 | ij_html_quote_style = double 1295 | ij_html_remove_new_line_before_tags = br 1296 | ij_html_space_after_tag_name = false 1297 | ij_html_space_around_equality_in_attribute = false 1298 | ij_html_space_inside_empty_tag = false 1299 | ij_html_text_wrap = normal 1300 | 1301 | [{*.vsl,*.vm,*.ft}] 1302 | indent_size = 4 1303 | tab_width = 4 1304 | ij_continuation_indent_size = 8 1305 | ij_vtl_keep_indents_on_empty_lines = false 1306 | 1307 | [{*.xjsp,*.tag,*.jsf,*.jsp,*.jspf,*.tagf}] 1308 | indent_size = 4 1309 | tab_width = 4 1310 | ij_continuation_indent_size = 8 1311 | ij_jsp_jsp_prefer_comma_separated_import_list = false 1312 | ij_jsp_keep_indents_on_empty_lines = false 1313 | 1314 | [{*.yml,*.yaml}] 1315 | tab_width = 4 1316 | ij_continuation_indent_size = 2 1317 | ij_yaml_keep_indents_on_empty_lines = false 1318 | ij_yaml_keep_line_breaks = true 1319 | 1320 | [{*.zsh,*.bash,*.sh}] 1321 | ij_shell_binary_ops_start_line = false 1322 | ij_shell_keep_column_alignment_padding = false 1323 | ij_shell_minify_program = false 1324 | ij_shell_redirect_followed_by_space = false 1325 | ij_shell_switch_cases_indented = false 1326 | 1327 | [{.eslintrc,.babelrc,jest.config,.stylelintrc,*.bowerrc,*.jsb3,*.jsb2,*.json}] 1328 | ij_json_keep_blank_lines_in_code = 0 1329 | ij_json_keep_indents_on_empty_lines = false 1330 | ij_json_keep_line_breaks = true 1331 | ij_json_space_after_colon = true 1332 | ij_json_space_after_comma = true 1333 | ij_json_space_before_colon = true 1334 | ij_json_space_before_comma = false 1335 | ij_json_spaces_within_braces = false 1336 | ij_json_spaces_within_brackets = false 1337 | ij_json_wrap_long_lines = false 1338 | 1339 | [{messages.*,spring.schemas,spring.handlers,messages,*.properties}] 1340 | ij_properties_align_group_field_declarations = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Datasource local storage ignored files 5 | /../../../../../../:\Users\YuWork\IdeaProjects\PerformanceFactory\.idea/dataSources/ 6 | /dataSources.local.xml 7 | # Editor-based HTTP Client requests 8 | /httpRequests/ 9 | 10 | build/ 11 | .idea 12 | .gradle 13 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM gradle:7.4.0 as build 2 | 3 | COPY . /opt/project/src 4 | WORKDIR /opt/project/src 5 | 6 | RUN ./gradlew clean build --no-daemon && \ 7 | rm -rf /home/builder/.kotlin/ && \ 8 | rm -rf /tmp/kotlin* 9 | 10 | FROM openjdk:11.0 11 | EXPOSE 1080 12 | EXPOSE 587 13 | 14 | COPY --from=build /opt/project/src/build/libs/*.jar /bin/runner/run.jar 15 | WORKDIR /bin/runner 16 | -------------------------------------------------------------------------------- /Dockerfile.build: -------------------------------------------------------------------------------- 1 | FROM gradle:7.4.0 2 | 3 | COPY --chown=builder:builders . /opt/project/src 4 | WORKDIR /opt/project/src 5 | 6 | # ARG GRADLE_USER_HOME=/opt/project/gradle_user_home 7 | 8 | USER builder 9 | 10 | RUN ./gradlew build 11 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Performance-Mockserver 2 | 3 | ## сервис-заглушка на базе [mockserver](https://www.mock-server.com/) 4 | 5 | ### Описание 6 | 7 | Для реализации собственных заглушек нужно добавить в 8 | директорию `org.samokat.performance.mockserver.mocks` класс с ожиданиями по примеру 9 | `Croissant.java` или `BananaBread.java`. Один класс представляет полную конфигурацию заглушки. Также 10 | стоит добавить в `org.samokat.performance.mockserver.core.initializer.CommandSwitcher` инициализацию 11 | вашей конфигурации по примеру. 12 | 13 | ### Функционал 14 | 15 | Метрики mockserver - http://localhost:1080/mockserver/metrics 16 | Дашборд для отладки - http://localhost:1080/mockserver/dashboard 17 | Помимо конфигураций описываемых в классах директории `org.samokat.performance.mockserver.mocks` релизовано: 18 | 19 | - заглушка SMTP по порту 587 20 | - заглушка graphql для экстернал полей (пример использования в `BananaBread.java`) 21 | - метрики micrometer - http://localhost:8080/prometheus 22 | 23 | ### HowToRun 24 | 25 | #### Docker 26 | 27 | Замените значение для team : croissant, bananabread или индентификатор вашей заглушки 28 | 29 | ``` 30 | docker build -t mock . 31 | docker run --name mock -p 587:587 -p 1080:1080 -p 8080:8080 -it mock:latest java -jar -Dteam= -Dloglevel=ERROR run.jar 32 | ``` -------------------------------------------------------------------------------- /build.gradle.kts: -------------------------------------------------------------------------------- 1 | import org.gradle.api.JavaVersion.VERSION_11 2 | import org.gradle.jvm.tasks.Jar 3 | 4 | plugins { 5 | `java-library` 6 | } 7 | 8 | extensions.getByType(JavaPluginExtension::class.java).apply { 9 | sourceCompatibility = VERSION_11 10 | targetCompatibility = VERSION_11 11 | } 12 | 13 | tasks.withType(Javadoc::class) { 14 | enabled = false 15 | } 16 | 17 | tasks.withType { 18 | options.encoding = "UTF-8" 19 | } 20 | 21 | tasks.withType { 22 | systemProperty("CLIENT_PORT", project.property("CLIENT_PORT")!!) 23 | systemProperty("JVM_METRICS_PORT", project.property("JVM_METRICS_PORT")!!) 24 | systemProperty("JVM_METRICS_PATH", project.property("JVM_METRICS_PATH")!!) 25 | systemProperty("SMTP_DELAY_SECONDS", project.property("SMTP_DELAY_SECONDS")!!) 26 | systemProperty("SMTP_PORT", project.property("SMTP_PORT")!!) 27 | systemProperty("team", project.property("team")!!) 28 | systemProperty("loglevel", project.property("loglevel")!!) 29 | } 30 | 31 | repositories { 32 | mavenCentral() 33 | } 34 | 35 | dependencies { 36 | implementation("org.mock-server:mockserver-netty:5.15.0") 37 | implementation("org.slf4j:slf4j-api:2.0.6") 38 | implementation("org.slf4j:slf4j-reload4j:2.0.6") 39 | implementation("io.micrometer:micrometer-registry-prometheus:1.10.3") 40 | implementation("com.graphql-java:graphql-java:20.0") 41 | implementation("com.google.code.gson:gson:2.10.1") 42 | implementation("com.github.kirviq:dumbster:1.7.1") 43 | } 44 | 45 | val fatJar = task("fatJar", type = Jar::class) { 46 | duplicatesStrategy = DuplicatesStrategy.EXCLUDE 47 | manifest { 48 | attributes["Implementation-Title"] = "Gradle Jar File" 49 | attributes["Main-Class"] = "org.samokat.performance.mockserver.core.MockServer" 50 | } 51 | exclude("META-INF", "META-INF/*.DSA") 52 | exclude("META-INF", "META-INF/*.SF") 53 | from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }) 54 | with(tasks.jar.get() as CopySpec) 55 | } 56 | 57 | tasks { 58 | "build" { 59 | dependsOn(fatJar) 60 | } 61 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | CLIENT_PORT=1080 2 | JVM_METRICS_PORT=8080 3 | JVM_METRICS_PATH=/prometheus 4 | SMTP_DELAY_SECONDS=5 5 | SMTP_PORT=587 6 | team=croissant 7 | loglevel=DEBUG 8 | version=1.0.0 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ecomtech-oss/performance-mockserver/3b2816551184a9841d085f4b796877965a4b62f8/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS='"-Xmx64m"' 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" 173 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS="-Xmx64m" 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "performance-mock" 2 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/core/MockServer.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.core; 2 | 3 | import com.sun.net.httpserver.HttpServer; 4 | import io.micrometer.core.instrument.binder.jvm.ClassLoaderMetrics; 5 | import io.micrometer.core.instrument.binder.jvm.JvmGcMetrics; 6 | import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics; 7 | import io.micrometer.core.instrument.binder.jvm.JvmThreadMetrics; 8 | import io.micrometer.core.instrument.binder.system.ProcessorMetrics; 9 | import io.micrometer.prometheus.PrometheusConfig; 10 | import io.micrometer.prometheus.PrometheusMeterRegistry; 11 | import java.io.IOException; 12 | import java.io.OutputStream; 13 | import java.net.InetSocketAddress; 14 | import java.util.Objects; 15 | import java.util.concurrent.ScheduledThreadPoolExecutor; 16 | import java.util.concurrent.TimeUnit; 17 | import org.mockserver.configuration.Configuration; 18 | import org.mockserver.integration.ClientAndServer; 19 | import org.samokat.performance.mockserver.core.initializer.CommandSwitcher; 20 | import org.samokat.performance.mockserver.utils.SmtpServer; 21 | import org.slf4j.Logger; 22 | import org.slf4j.LoggerFactory; 23 | 24 | public class MockServer { 25 | 26 | private static ClientAndServer mockServer; 27 | 28 | static Logger log = LoggerFactory.getLogger(MockServer.class); 29 | 30 | 31 | public static void main(String[] args) { 32 | try { 33 | var mockType = System.getProperty("team").toLowerCase(); 34 | var logLevel = System.getProperty("loglevel").toUpperCase(); 35 | int smtpDelaySeconds = Integer.parseInt(System.getProperty("SMTP_DELAY_SECONDS")); 36 | log.info(mockType); 37 | startMockServer(logLevel); 38 | mockServer.upsert( 39 | Objects.requireNonNull(CommandSwitcher.getCommand(mockType)) 40 | .initializeExpectations()); 41 | log.info("Mockserver is running"); 42 | 43 | ScheduledThreadPoolExecutor threadPool = new ScheduledThreadPoolExecutor(1); 44 | threadPool.scheduleWithFixedDelay(new SmtpServer(), 0, smtpDelaySeconds, 45 | TimeUnit.SECONDS); 46 | } catch (NullPointerException | IOException e) { 47 | log.error("Fatal error in initialization process", e); 48 | System.exit(1); 49 | } 50 | } 51 | 52 | 53 | public static void startMockServer(String logLevel) throws IOException { 54 | var clientPort = Integer.parseInt(System.getProperty("CLIENT_PORT")); 55 | var jvmMetricsPort = Integer.parseInt(System.getProperty("JVM_METRICS_PORT")); 56 | var jvmMetricsPath = System.getProperty("JVM_METRICS_PATH").toLowerCase(); 57 | Configuration config = new Configuration() 58 | .metricsEnabled(true) 59 | .logLevel(logLevel) 60 | .maxLogEntries(1000) 61 | .clientNioEventLoopThreadCount(10) 62 | .actionHandlerThreadCount(5) 63 | .maximumNumberOfRequestToReturnInVerificationFailure(1) 64 | .attemptToProxyIfNoMatchingExpectation(false) 65 | .maxSocketTimeoutInMillis(60000L); 66 | if (logLevel.equals("ERROR")) { 67 | config.disableLogging(true) 68 | .detailedMatchFailures(false); 69 | } 70 | mockServer = ClientAndServer.startClientAndServer(config, clientPort); 71 | 72 | PrometheusMeterRegistry prometheusRegistry = new PrometheusMeterRegistry( 73 | PrometheusConfig.DEFAULT); 74 | new ClassLoaderMetrics().bindTo(prometheusRegistry); 75 | new JvmMemoryMetrics().bindTo(prometheusRegistry); 76 | new JvmGcMetrics().bindTo(prometheusRegistry); 77 | new JvmThreadMetrics().bindTo(prometheusRegistry); 78 | new ProcessorMetrics().bindTo(prometheusRegistry); 79 | 80 | HttpServer server = HttpServer.create(new InetSocketAddress(jvmMetricsPort), 0); 81 | server.createContext(jvmMetricsPath, httpExchange -> 82 | { 83 | String response = prometheusRegistry.scrape(); 84 | httpExchange.sendResponseHeaders(200, response.getBytes().length); 85 | try (OutputStream os = httpExchange.getResponseBody()) { 86 | os.write(response.getBytes()); 87 | } catch (IOException e) { 88 | log.error("Error in exposing jvm metrics", e); 89 | } 90 | }); 91 | new Thread(server::start).start(); 92 | log.info("JVM metrics are exposing now"); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/core/initializer/Command.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.core.initializer; 2 | 3 | import java.io.IOException; 4 | import org.mockserver.mock.Expectation; 5 | 6 | /** 7 | * Configures expectations of mock for Command 8 | */ 9 | public interface Command { 10 | 11 | /** 12 | * Init list of Expectations 13 | * 14 | * @return Expectation[] 15 | * @throws IOException 16 | * @see Expectation 17 | */ 18 | default Expectation[] initializeExpectations() throws IOException { 19 | return new Expectation[]{}; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/core/initializer/CommandSwitcher.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.core.initializer; 2 | 3 | import org.samokat.performance.mockserver.mocks.BananaBread; 4 | import org.samokat.performance.mockserver.mocks.Croissant; 5 | 6 | public class CommandSwitcher { 7 | 8 | public static Command getCommand(String commandName) { 9 | switch (commandName) { 10 | case "bananabread": 11 | return new BananaBread(); 12 | case "croissant": 13 | return new Croissant(); 14 | default: 15 | return null; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/core/initializer/Utils.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.core.initializer; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.nio.charset.StandardCharsets; 6 | import org.apache.commons.io.IOUtils; 7 | 8 | public class Utils { 9 | 10 | public static String getFile(String local) throws IOException { 11 | InputStream in = CommandSwitcher.class.getClassLoader().getResourceAsStream(local); 12 | String file = null; 13 | if (in != null) { 14 | file = IOUtils.toString(in, StandardCharsets.UTF_8); 15 | } 16 | return file; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/helpers/externalfield/RepresentationsItem.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.helpers.externalfield; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | public class RepresentationsItem { 6 | 7 | @SerializedName("__typename") 8 | private String typename; 9 | 10 | 11 | public String getTypename() { 12 | return typename; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/helpers/externalfield/Response.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.helpers.externalfield; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | 5 | public class Response { 6 | 7 | @SerializedName("variables") 8 | private Variables variables; 9 | 10 | @SerializedName("query") 11 | private String query; 12 | 13 | @SerializedName("operationName") 14 | private String operationName; 15 | 16 | 17 | public Variables getVariables() { 18 | return variables; 19 | } 20 | 21 | 22 | public String getQuery() { 23 | return query; 24 | } 25 | 26 | 27 | public String getOperationName() { 28 | return operationName; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/helpers/externalfield/Variables.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.helpers.externalfield; 2 | 3 | import com.google.gson.annotations.SerializedName; 4 | import java.util.List; 5 | 6 | public class Variables { 7 | 8 | @SerializedName("representations") 9 | private List representations; 10 | 11 | 12 | public List getRepresentations() { 13 | return representations; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/mocks/BananaBread.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.mocks; 2 | 3 | import static org.mockserver.model.HttpRequest.request; 4 | import static org.mockserver.model.HttpResponse.response; 5 | import static org.mockserver.model.JsonBody.json; 6 | import static org.mockserver.model.JsonPathBody.jsonPath; 7 | 8 | import java.io.IOException; 9 | import java.nio.charset.StandardCharsets; 10 | import java.util.List; 11 | import java.util.Random; 12 | import org.apache.commons.lang3.RandomStringUtils; 13 | import org.mockserver.mock.Expectation; 14 | import org.mockserver.model.HttpClassCallback; 15 | import org.samokat.performance.mockserver.core.initializer.Command; 16 | import org.samokat.performance.mockserver.core.initializer.Utils; 17 | import org.samokat.performance.mockserver.utils.ExternalField; 18 | 19 | public class BananaBread implements Command { 20 | 21 | @Override 22 | public Expectation[] initializeExpectations() throws IOException { 23 | return new Expectation[]{ 24 | 25 | new Expectation( 26 | request() 27 | .withMethod("POST") 28 | .withPath("/graphql") 29 | .withBody(Utils.getFile("bananabread/get_scheme.json")) 30 | ).thenRespond( 31 | response() 32 | .withBody( 33 | json(Utils.getFile("bananabread/scheme.json"), StandardCharsets.UTF_8) 34 | ) 35 | ), 36 | // заглушка экстернал полей 37 | new Expectation( 38 | request() 39 | .withMethod("POST") 40 | .withPath("/graphql") 41 | .withBody(jsonPath("$.variables.representations[*]")) 42 | ).thenRespond( 43 | HttpClassCallback.callback().withCallbackClass(ExternalFieldBananaBread.class) 44 | ), 45 | }; 46 | } 47 | 48 | 49 | public static class ExternalFieldBananaBread implements ExternalField { 50 | 51 | @Override 52 | public String parametrizeByRule(String name) { 53 | if (name.equals("id")) { 54 | List id = List.of( 55 | "bab28819-bae3-4891-96f9-e2e214265fa3", 56 | "424c1588-4fa4-4ccc-93ea-d50cedbb51b4"); 57 | return id.get(new Random().nextInt(id.size())); 58 | } else { 59 | return RandomStringUtils.randomAlphabetic(10); 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/mocks/Croissant.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.mocks; 2 | 3 | import static org.mockserver.model.HttpRequest.request; 4 | import static org.mockserver.model.HttpResponse.response; 5 | import static org.mockserver.model.JsonBody.json; 6 | 7 | import java.io.IOException; 8 | import java.nio.charset.StandardCharsets; 9 | import java.util.Arrays; 10 | import java.util.List; 11 | import java.util.Random; 12 | import java.util.UUID; 13 | import net.minidev.json.JSONObject; 14 | import org.mockserver.mock.Expectation; 15 | import org.mockserver.mock.action.ExpectationResponseCallback; 16 | import org.mockserver.model.HttpClassCallback; 17 | import org.mockserver.model.HttpRequest; 18 | import org.mockserver.model.HttpResponse; 19 | import org.mockserver.model.MediaType; 20 | import org.samokat.performance.mockserver.core.initializer.Command; 21 | import org.samokat.performance.mockserver.core.initializer.Utils; 22 | 23 | public class Croissant implements Command { 24 | 25 | @Override 26 | public Expectation[] initializeExpectations() throws IOException { 27 | return new Expectation[]{ 28 | 29 | new Expectation( 30 | request() 31 | .withMethod("POST") 32 | .withPath("/quaso/stock") 33 | ).thenRespond( 34 | response() 35 | .withBody( 36 | json(Utils.getFile("croissant/stock.json"), StandardCharsets.UTF_8) 37 | ) 38 | ), 39 | 40 | new Expectation( 41 | request() 42 | .withMethod("GET").withPath("/quaso/.+/info") 43 | ).thenRespond( 44 | HttpClassCallback.callback().withCallbackClass(CroissantCall.class) 45 | ), 46 | 47 | new Expectation( 48 | request() 49 | .withMethod("GET") 50 | .withPath("/quaso") 51 | ).thenRespond( 52 | HttpClassCallback.callback().withCallbackClass(RandomCroissantCall.class) 53 | ), 54 | 55 | }; 56 | } 57 | 58 | 59 | public static class CroissantCall implements ExpectationResponseCallback { 60 | 61 | @Override 62 | public HttpResponse handle(HttpRequest httpRequest) { 63 | JSONObject json = new JSONObject(); 64 | var uuid = httpRequest.getPath().getValue() 65 | .replaceFirst("/quaso/", "") 66 | .replaceFirst("/info", ""); 67 | json.put("id", uuid); 68 | 69 | List types = Arrays.asList("chocolate", "almond", "raspberry"); 70 | Random rand = new Random(); 71 | String type = types.get(rand.nextInt(types.size())); 72 | json.put("type", type); 73 | json.put("taste", "fantastic"); 74 | return response().withBody(json(json)) 75 | .withContentType(MediaType.APPLICATION_JSON_UTF_8); 76 | } 77 | } 78 | 79 | public static class RandomCroissantCall implements ExpectationResponseCallback { 80 | 81 | @Override 82 | public HttpResponse handle(HttpRequest httpRequest) { 83 | JSONObject json = new JSONObject(); 84 | UUID uuid = UUID.randomUUID(); 85 | json.put("id", uuid); 86 | 87 | List types = Arrays.asList("chocolate", "almond", "raspberry"); 88 | Random rand = new Random(); 89 | String type = types.get(rand.nextInt(types.size())); 90 | json.put("type", type); 91 | return response().withBody(json(json)) 92 | .withContentType(MediaType.APPLICATION_JSON_UTF_8); 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/utils/ExternalField.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.utils; 2 | 3 | import static org.mockserver.model.HttpResponse.response; 4 | 5 | import com.google.gson.Gson; 6 | import com.google.gson.JsonArray; 7 | import com.google.gson.JsonObject; 8 | import graphql.language.Document; 9 | import graphql.language.Field; 10 | import graphql.language.InlineFragment; 11 | import graphql.language.OperationDefinition; 12 | import graphql.language.SelectionSet; 13 | import graphql.parser.Parser; 14 | import java.util.ArrayList; 15 | import java.util.HashMap; 16 | import java.util.List; 17 | import java.util.Map; 18 | import java.util.Objects; 19 | import org.apache.commons.lang3.RandomStringUtils; 20 | import org.mockserver.mock.action.ExpectationResponseCallback; 21 | import org.mockserver.model.HttpRequest; 22 | import org.mockserver.model.HttpResponse; 23 | import org.mockserver.model.MediaType; 24 | import org.samokat.performance.mockserver.helpers.externalfield.RepresentationsItem; 25 | import org.samokat.performance.mockserver.helpers.externalfield.Response; 26 | 27 | /** 28 | * Special kind of ExpectationResponseCallback for processing graphql external fields 29 | */ 30 | public interface ExternalField extends ExpectationResponseCallback { 31 | 32 | /** 33 | * Returns value of parameter by name. You can specify custom logic or constant values. 34 | * 35 | * @param name The name of requested parameter 36 | * @return String 37 | */ 38 | default String parametrizeByRule(String name) { 39 | return RandomStringUtils.randomAlphabetic(10); 40 | } 41 | 42 | 43 | @Override 44 | default HttpResponse handle(HttpRequest httpRequest) { 45 | var rawBody = httpRequest.getBody().getValue().toString(); 46 | 47 | Gson gson = new Gson(); 48 | Response body = gson.fromJson(rawBody, Response.class); 49 | 50 | var query = body.getQuery().replaceFirst(".+?\\)", ""); 51 | System.out.println(query); 52 | 53 | var params = getParams(query); 54 | 55 | HashMap variables = getVars(rawBody); 56 | 57 | var list = body.getVariables().getRepresentations(); 58 | var json = new JsonObject(); 59 | var entities = new JsonObject(); 60 | entities.add("_entities", new JsonArray()); 61 | 62 | for (RepresentationsItem el : list) { 63 | var type = el.getTypename(); 64 | var externalData = new JsonObject(); 65 | externalData.addProperty("__typename", type); 66 | if (!variables.isEmpty()) { 67 | for (Map.Entry entry : variables.entrySet()) { 68 | externalData.addProperty(String.format("_%s", entry.getKey()), 69 | entry.getValue().toString()); 70 | } 71 | } 72 | for (Object param : params) { 73 | if (param instanceof String) { 74 | externalData.addProperty((String) param, 75 | RandomStringUtils.randomAlphabetic(10)); 76 | } else if (param instanceof List) { 77 | var objectParam = (List) param; 78 | var jsonParam = (JsonObject) objectParam.get(1); 79 | var name = (String) objectParam.get(0); 80 | 81 | externalData.add(name, jsonParam.getAsJsonObject(name)); 82 | } 83 | } 84 | entities.getAsJsonArray("_entities").add(externalData); 85 | } 86 | json.add("data", entities); 87 | 88 | return response().withBody(json.toString()) 89 | .withContentType(MediaType.APPLICATION_JSON_UTF_8); 90 | } 91 | 92 | 93 | private List getParams(String query) { 94 | Parser parser = new Parser(); 95 | List paramList = new ArrayList<>(); 96 | Document document = parser.parseDocument(query); 97 | OperationDefinition operation = null; 98 | for (var definition : document.getDefinitions()) { 99 | if (definition instanceof OperationDefinition) { 100 | operation = (OperationDefinition) definition; 101 | } 102 | } 103 | Field entities = null; 104 | for (var selection : Objects.requireNonNull(operation).getSelectionSet().getSelections()) { 105 | if (selection instanceof Field) { 106 | entities = (Field) selection; 107 | } 108 | } 109 | InlineFragment selectionInlineFragment = null; 110 | for (var selectionFragment : Objects.requireNonNull(entities).getSelectionSet() 111 | .getSelections()) { 112 | if (selectionFragment instanceof InlineFragment) { 113 | selectionInlineFragment = (InlineFragment) selectionFragment; 114 | } 115 | } 116 | Field mainField = null; 117 | for (var selectionField : Objects.requireNonNull(selectionInlineFragment).getSelectionSet() 118 | .getSelections()) { 119 | if (selectionField instanceof Field) { 120 | mainField = (Field) selectionField; 121 | } 122 | } 123 | if (Objects.requireNonNull(mainField).getSelectionSet() == null) { 124 | paramList.add(mainField.getName()); 125 | } else { 126 | paramList.add(List.of(mainField.getName(), getSubField( 127 | mainField.getName(), 128 | mainField.getSelectionSet()))); 129 | } 130 | return paramList; 131 | } 132 | 133 | 134 | private JsonObject getSubField(String name, SelectionSet value) { 135 | var result = new JsonObject(); 136 | var subField = new JsonObject(); 137 | for (var selection : value.getSelections()) { 138 | Field field = (Field) selection; 139 | if (field.getSelectionSet() != null) { 140 | subField.add(field.getName(), 141 | getSubField(field.getName(), field.getSelectionSet())); 142 | } else { 143 | subField.addProperty(field.getName(), parametrizeByRule(field.getName())); 144 | } 145 | } 146 | result.add(name, subField); 147 | return result; 148 | } 149 | 150 | 151 | private HashMap getVars(String rawBody) { 152 | 153 | var vars = rawBody.replaceAll("[\n,\r ]", "") 154 | .replaceFirst(".+\"__typename\":\".+?\"", "") 155 | .replaceFirst("}]}.+", "") 156 | .replaceAll("\"", "") 157 | .split(","); 158 | 159 | HashMap variables = new HashMap<>(); 160 | for (String v : vars) { 161 | var pair = v.split(":"); 162 | variables.put(pair[0], pair[1]); 163 | } 164 | return variables; 165 | } 166 | } -------------------------------------------------------------------------------- /src/main/java/org/samokat/performance/mockserver/utils/SmtpServer.java: -------------------------------------------------------------------------------- 1 | package org.samokat.performance.mockserver.utils; 2 | 3 | import com.dumbster.smtp.SimpleSmtpServer; 4 | import java.io.IOException; 5 | import org.samokat.performance.mockserver.core.MockServer; 6 | import org.slf4j.Logger; 7 | import org.slf4j.LoggerFactory; 8 | 9 | public class SmtpServer implements Runnable { 10 | 11 | private final SimpleSmtpServer server; 12 | 13 | Logger log = LoggerFactory.getLogger(MockServer.class); 14 | 15 | 16 | public SmtpServer() throws IOException { 17 | int SMTP_PORT = Integer.parseInt(System.getProperty("SMTP_PORT")); 18 | server = SimpleSmtpServer.start(SMTP_PORT); 19 | log.info("SMTP service is ready for emails"); 20 | } 21 | 22 | 23 | @Override 24 | public void run() { 25 | if (this.server.getReceivedEmails().size() > 0) { 26 | log.info("Received " + this.server.getReceivedEmails().size()); 27 | server.reset(); 28 | } 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/resources/bananabread/get_scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "query": "query __ApolloGetServiceDefinition__ { _service { sdl } }" 3 | } -------------------------------------------------------------------------------- /src/main/resources/bananabread/scheme.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "_service": { 4 | "sdl": "schema {\n query: Query\n}\n\ntype Product {\n inStock: Boolean\n quantity: Int\n upc: String! @external\n}\n\ntype Query {\n getProduct: Product!\n}\n" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /src/main/resources/croissant/stock.json: -------------------------------------------------------------------------------- 1 | { 2 | "quantity": "999" 3 | } -------------------------------------------------------------------------------- /src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | --------------------------------------------------------------------------------