periplus-map 0.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. periplus/__init__.py +70 -0
  2. periplus/checkmap.py +80 -0
  3. periplus/cli.py +658 -0
  4. periplus/contract/schema/map.schema.json +138 -0
  5. periplus/contract/schema/navigation.schema.json +200 -0
  6. periplus/contract/schema/pack-file.schema.json +1405 -0
  7. periplus/contract/schema/pack-manifest.schema.json +245 -0
  8. periplus/contract/schema/project-settings.schema.json +85 -0
  9. periplus/contract/spec/engine.md +151 -0
  10. periplus/contract/spec/rules.md +352 -0
  11. periplus/detect.py +228 -0
  12. periplus/engine/__init__.py +5 -0
  13. periplus/engine/check.py +481 -0
  14. periplus/engine/emit.py +368 -0
  15. periplus/engine/packload.py +2321 -0
  16. periplus/engine/pattern.py +27 -0
  17. periplus/engine/rules.py +1946 -0
  18. periplus/engine/select.py +491 -0
  19. periplus/engine/source.py +172 -0
  20. periplus/engine/tree.py +424 -0
  21. periplus/errors.py +332 -0
  22. periplus/init.py +358 -0
  23. periplus/layout.py +28 -0
  24. periplus/manifest.py +498 -0
  25. periplus/map.py +364 -0
  26. periplus/navigate/__init__.py +1 -0
  27. periplus/navigate/find.py +143 -0
  28. periplus/navigate/ids.py +30 -0
  29. periplus/navigate/listing.py +42 -0
  30. periplus/navigate/mapfile.py +189 -0
  31. periplus/navigate/path.py +175 -0
  32. periplus/navigate/show.py +175 -0
  33. periplus/navigate/types.py +83 -0
  34. periplus/navigate/walk.py +138 -0
  35. periplus/packs/advancedqueue_basic@0.0.1/pack.yaml +14 -0
  36. periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type.yaml +9 -0
  37. periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type_annotation.yaml +43 -0
  38. periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type_attribute.yaml +43 -0
  39. periplus/packs/ai_basic@0.0.1/ai_agent/ai_agent.yaml +8 -0
  40. periplus/packs/ai_basic@0.0.1/ai_agent/ai_agent_attribute.yaml +43 -0
  41. periplus/packs/ai_basic@0.0.1/ai_function_call/ai_function_call.yaml +8 -0
  42. periplus/packs/ai_basic@0.0.1/ai_function_call/ai_function_call_attribute.yaml +43 -0
  43. periplus/packs/ai_basic@0.0.1/pack.yaml +15 -0
  44. periplus/packs/config_pages_basic@0.0.1/bundle/config_pages_bundle_config.yaml +54 -0
  45. periplus/packs/config_pages_basic@0.0.1/pack.yaml +11 -0
  46. periplus/packs/crop_basic@0.0.1/bundle/crop_bundle_config.yaml +54 -0
  47. periplus/packs/crop_basic@0.0.1/pack.yaml +11 -0
  48. periplus/packs/drupal@0.1.0/block/block_placement.yaml +25 -0
  49. periplus/packs/drupal@0.1.0/block/block_placement_code.yaml +58 -0
  50. periplus/packs/drupal@0.1.0/block/block_placement_config.yaml +53 -0
  51. periplus/packs/drupal@0.1.0/block/block_plugin.yaml +52 -0
  52. periplus/packs/drupal@0.1.0/block/block_plugin_altered.yaml +61 -0
  53. periplus/packs/drupal@0.1.0/block/block_plugin_annotation.yaml +69 -0
  54. periplus/packs/drupal@0.1.0/block/block_plugin_attribute.yaml +56 -0
  55. periplus/packs/drupal@0.1.0/block/block_plugin_content.yaml +46 -0
  56. periplus/packs/drupal@0.1.0/block/block_plugin_derived.yaml +110 -0
  57. periplus/packs/drupal@0.1.0/block/block_plugin_deriver.yaml +30 -0
  58. periplus/packs/drupal@0.1.0/block/block_type.yaml +14 -0
  59. periplus/packs/drupal@0.1.0/block/block_type_code.yaml +43 -0
  60. periplus/packs/drupal@0.1.0/block/block_type_config.yaml +45 -0
  61. periplus/packs/drupal@0.1.0/cache/cache.yaml +18 -0
  62. periplus/packs/drupal@0.1.0/cache/cache_backend.yaml +31 -0
  63. periplus/packs/drupal@0.1.0/component/sdc.yaml +19 -0
  64. periplus/packs/drupal@0.1.0/component/sdc_definition.yaml +25 -0
  65. periplus/packs/drupal@0.1.0/component/sdc_use.yaml +25 -0
  66. periplus/packs/drupal@0.1.0/config/config_object.yaml +65 -0
  67. periplus/packs/drupal@0.1.0/display/display.yaml +32 -0
  68. periplus/packs/drupal@0.1.0/display/display_code.yaml +53 -0
  69. periplus/packs/drupal@0.1.0/display/display_config.yaml +95 -0
  70. periplus/packs/drupal@0.1.0/entity/entity.yaml +33 -0
  71. periplus/packs/drupal@0.1.0/entity/entity_class.yaml +60 -0
  72. periplus/packs/drupal@0.1.0/entity/entity_save.yaml +27 -0
  73. periplus/packs/drupal@0.1.0/entity/entity_type_annotation.yaml +85 -0
  74. periplus/packs/drupal@0.1.0/entity/entity_type_attribute.yaml +76 -0
  75. periplus/packs/drupal@0.1.0/field/field_instance_code.yaml +40 -0
  76. periplus/packs/drupal@0.1.0/field/field_instance_config.yaml +58 -0
  77. periplus/packs/drupal@0.1.0/field/field_storage.yaml +37 -0
  78. periplus/packs/drupal@0.1.0/field/field_storage_code.yaml +39 -0
  79. periplus/packs/drupal@0.1.0/field/field_storage_config.yaml +24 -0
  80. periplus/packs/drupal@0.1.0/form/form.yaml +48 -0
  81. periplus/packs/drupal@0.1.0/form/form_class.yaml +50 -0
  82. periplus/packs/drupal@0.1.0/form/form_id.yaml +48 -0
  83. periplus/packs/drupal@0.1.0/form/form_methods.yaml +39 -0
  84. periplus/packs/drupal@0.1.0/hook/hook.yaml +8 -0
  85. periplus/packs/drupal@0.1.0/hook/hook_attribute.yaml +28 -0
  86. periplus/packs/drupal@0.1.0/module/module.yaml +8 -0
  87. periplus/packs/drupal@0.1.0/module/module_info.yaml +50 -0
  88. periplus/packs/drupal@0.1.0/pack.yaml +184 -0
  89. periplus/packs/drupal@0.1.0/plugin/plugin.yaml +17 -0
  90. periplus/packs/drupal@0.1.0/plugin/plugin_annotation.yaml +120 -0
  91. periplus/packs/drupal@0.1.0/recommendations/recommendations.yaml +14 -0
  92. periplus/packs/drupal@0.1.0/service/service.yaml +19 -0
  93. periplus/packs/drupal@0.1.0/service/service_autowire.yaml +28 -0
  94. periplus/packs/drupal@0.1.0/service/service_definition.yaml +24 -0
  95. periplus/packs/drupal@0.1.0/service/service_use.yaml +43 -0
  96. periplus/packs/drupal_basic@0.3.0/action/action.yaml +9 -0
  97. periplus/packs/drupal_basic@0.3.0/action/action_annotation.yaml +43 -0
  98. periplus/packs/drupal_basic@0.3.0/action/action_attribute.yaml +43 -0
  99. periplus/packs/drupal_basic@0.3.0/block/block_placement.yaml +16 -0
  100. periplus/packs/drupal_basic@0.3.0/block/block_placement_config.yaml +51 -0
  101. periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin.yaml +14 -0
  102. periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin_annotation.yaml +47 -0
  103. periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin_attribute.yaml +43 -0
  104. periplus/packs/drupal_basic@0.3.0/block_type/block_type.yaml +8 -0
  105. periplus/packs/drupal_basic@0.3.0/block_type/block_type_config.yaml +54 -0
  106. periplus/packs/drupal_basic@0.3.0/boundary/boundary_types.yaml +19 -0
  107. periplus/packs/drupal_basic@0.3.0/bundle/bundle.yaml +20 -0
  108. periplus/packs/drupal_basic@0.3.0/bundle/bundle_config.yaml +393 -0
  109. periplus/packs/drupal_basic@0.3.0/call/call.yaml +349 -0
  110. periplus/packs/drupal_basic@0.3.0/component/component.yaml +30 -0
  111. periplus/packs/drupal_basic@0.3.0/config/config_object.yaml +119 -0
  112. periplus/packs/drupal_basic@0.3.0/constraint/constraint.yaml +8 -0
  113. periplus/packs/drupal_basic@0.3.0/constraint/constraint_annotation.yaml +43 -0
  114. periplus/packs/drupal_basic@0.3.0/constraint/constraint_attribute.yaml +43 -0
  115. periplus/packs/drupal_basic@0.3.0/display/display.yaml +30 -0
  116. periplus/packs/drupal_basic@0.3.0/display/display_config.yaml +203 -0
  117. periplus/packs/drupal_basic@0.3.0/display/display_mode_config.yaml +60 -0
  118. periplus/packs/drupal_basic@0.3.0/entity_type/config_entity_type_annotation.yaml +46 -0
  119. periplus/packs/drupal_basic@0.3.0/entity_type/config_entity_type_attribute.yaml +43 -0
  120. periplus/packs/drupal_basic@0.3.0/entity_type/content_entity_type_annotation.yaml +46 -0
  121. periplus/packs/drupal_basic@0.3.0/entity_type/content_entity_type_attribute.yaml +43 -0
  122. periplus/packs/drupal_basic@0.3.0/entity_type/entity_type.yaml +16 -0
  123. periplus/packs/drupal_basic@0.3.0/field/field_instance_config.yaml +116 -0
  124. periplus/packs/drupal_basic@0.3.0/field/field_storage.yaml +21 -0
  125. periplus/packs/drupal_basic@0.3.0/field/field_storage_config.yaml +45 -0
  126. periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter.yaml +8 -0
  127. periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter_annotation.yaml +46 -0
  128. periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter_attribute.yaml +43 -0
  129. periplus/packs/drupal_basic@0.3.0/field_type/field_type_annotation.yaml +46 -0
  130. periplus/packs/drupal_basic@0.3.0/field_type/field_type_attribute.yaml +50 -0
  131. periplus/packs/drupal_basic@0.3.0/field_widget/field_widget_annotation.yaml +46 -0
  132. periplus/packs/drupal_basic@0.3.0/field_widget/field_widget_attribute.yaml +50 -0
  133. periplus/packs/drupal_basic@0.3.0/form/form_id.yaml +80 -0
  134. periplus/packs/drupal_basic@0.3.0/hook/hook.yaml +100 -0
  135. periplus/packs/drupal_basic@0.3.0/hook/hook_attribute.yaml +64 -0
  136. periplus/packs/drupal_basic@0.3.0/hook/hook_theme_include.yaml +34 -0
  137. periplus/packs/drupal_basic@0.3.0/library/library.yaml +12 -0
  138. periplus/packs/drupal_basic@0.3.0/library/library_definition.yaml +58 -0
  139. periplus/packs/drupal_basic@0.3.0/local_action/local_action.yaml +12 -0
  140. periplus/packs/drupal_basic@0.3.0/local_action/local_action_definition.yaml +49 -0
  141. periplus/packs/drupal_basic@0.3.0/mail/mail.yaml +8 -0
  142. periplus/packs/drupal_basic@0.3.0/mail/mail_attribute.yaml +43 -0
  143. periplus/packs/drupal_basic@0.3.0/media_source/media_source.yaml +8 -0
  144. periplus/packs/drupal_basic@0.3.0/media_source/media_source_annotation.yaml +43 -0
  145. periplus/packs/drupal_basic@0.3.0/media_source/media_source_attribute.yaml +79 -0
  146. periplus/packs/drupal_basic@0.3.0/menu_link/menu_link.yaml +18 -0
  147. periplus/packs/drupal_basic@0.3.0/menu_link/menu_link_definition.yaml +48 -0
  148. periplus/packs/drupal_basic@0.3.0/module/module.yaml +7 -0
  149. periplus/packs/drupal_basic@0.3.0/module/module_info.yaml +58 -0
  150. periplus/packs/drupal_basic@0.3.0/pack.yaml +528 -0
  151. periplus/packs/drupal_basic@0.3.0/permission/permission.yaml +7 -0
  152. periplus/packs/drupal_basic@0.3.0/permission/permission_definition.yaml +27 -0
  153. periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker.yaml +9 -0
  154. periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker_annotation.yaml +43 -0
  155. periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker_attribute.yaml +43 -0
  156. periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource.yaml +8 -0
  157. periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource_annotation.yaml +43 -0
  158. periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource_attribute.yaml +43 -0
  159. periplus/packs/drupal_basic@0.3.0/role/role.yaml +14 -0
  160. periplus/packs/drupal_basic@0.3.0/role/role_config.yaml +44 -0
  161. periplus/packs/drupal_basic@0.3.0/route/route.yaml +42 -0
  162. periplus/packs/drupal_basic@0.3.0/route/route_definition.yaml +113 -0
  163. periplus/packs/drupal_basic@0.3.0/route/route_options.yaml +55 -0
  164. periplus/packs/drupal_basic@0.3.0/route/route_requirements.yaml +108 -0
  165. periplus/packs/drupal_basic@0.3.0/service/service.yaml +56 -0
  166. periplus/packs/drupal_basic@0.3.0/service/service_definition.yaml +181 -0
  167. periplus/packs/drupal_basic@0.3.0/template/template.yaml +86 -0
  168. periplus/packs/drupal_basic@0.3.0/template/template_route_link.yaml +30 -0
  169. periplus/packs/drupal_basic@0.3.0/theme/theme.yaml +15 -0
  170. periplus/packs/drupal_basic@0.3.0/theme/theme_info.yaml +61 -0
  171. periplus/packs/drupal_basic@0.3.0/theme_hook/template_suggestion.yaml +29 -0
  172. periplus/packs/drupal_basic@0.3.0/theme_hook/theme_hook.yaml +87 -0
  173. periplus/packs/drupal_basic@0.3.0/theme_hook/theme_hook_render.yaml +20 -0
  174. periplus/packs/drupal_basic@0.3.0/url/url.yaml +88 -0
  175. periplus/packs/drupal_basic@0.3.0/views_plugin/views_field_attribute.yaml +80 -0
  176. periplus/packs/drupal_basic@0.3.0/views_plugin/views_filter_attribute.yaml +80 -0
  177. periplus/packs/drupal_basic@0.3.0/views_plugin/views_plugin.yaml +15 -0
  178. periplus/packs/drupal_basic@0.3.0/views_plugin/views_style_attribute.yaml +80 -0
  179. periplus/packs/drupal_js_basic@0.0.1/attachment/attachment.yaml +12 -0
  180. periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_php.yaml +15 -0
  181. periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_php_array.yaml +52 -0
  182. periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_twig.yaml +26 -0
  183. periplus/packs/drupal_js_basic@0.0.1/attachment/php_function_holder.yaml +13 -0
  184. periplus/packs/drupal_js_basic@0.0.1/behavior/behavior.yaml +198 -0
  185. periplus/packs/drupal_js_basic@0.0.1/pack.yaml +153 -0
  186. periplus/packs/drupal_js_basic@0.0.1/setting/setting.yaml +13 -0
  187. periplus/packs/drupal_js_basic@0.0.1/setting/setting_in_js.yaml +15 -0
  188. periplus/packs/drupal_js_basic@0.0.1/setting/setting_in_php.yaml +92 -0
  189. periplus/packs/drush_basic@0.0.1/command/command.yaml +15 -0
  190. periplus/packs/drush_basic@0.0.1/command/command_annotation.yaml +60 -0
  191. periplus/packs/drush_basic@0.0.1/command/command_attribute.yaml +88 -0
  192. periplus/packs/drush_basic@0.0.1/pack.yaml +29 -0
  193. periplus/packs/eck_basic@0.0.1/bundle/eck_bundle_config.yaml +56 -0
  194. periplus/packs/eck_basic@0.0.1/entity_type/eck_entity_type_config.yaml +26 -0
  195. periplus/packs/eck_basic@0.0.1/pack.yaml +28 -0
  196. periplus/packs/go@0.0.2/interfaces/satisfies.yaml +47 -0
  197. periplus/packs/go@0.0.2/pack.yaml +51 -0
  198. periplus/packs/go@0.0.2/types/find_declarations.yaml +137 -0
  199. periplus/packs/go@0.0.2/types/node_types.yaml +36 -0
  200. periplus/packs/go_basic@0.0.3/pack.yaml +104 -0
  201. periplus/packs/go_basic@0.0.3/rules/calls.yaml +25 -0
  202. periplus/packs/go_basic@0.0.3/rules/declarations.yaml +40 -0
  203. periplus/packs/go_basic@0.0.3/rules/imports.yaml +16 -0
  204. periplus/packs/go_basic@0.0.3/types/node_types.yaml +15 -0
  205. periplus/packs/js_basic@0.0.1/function/function.yaml +68 -0
  206. periplus/packs/js_basic@0.0.1/pack.yaml +50 -0
  207. periplus/packs/laravel_basic@0.0.5/pack.yaml +313 -0
  208. periplus/packs/laravel_basic@0.0.5/rules/classes.yaml +42 -0
  209. periplus/packs/laravel_basic@0.0.5/rules/config.yaml +229 -0
  210. periplus/packs/laravel_basic@0.0.5/rules/routes.yaml +210 -0
  211. periplus/packs/laravel_basic@0.0.5/rules/types.yaml +50 -0
  212. periplus/packs/laravel_basic@0.0.5/rules/views.yaml +100 -0
  213. periplus/packs/paragraphs_basic@0.0.1/bundle/paragraph_bundle_config.yaml +54 -0
  214. periplus/packs/paragraphs_basic@0.0.1/pack.yaml +12 -0
  215. periplus/packs/php@0.1.0/edges/edge_kinds.yaml +64 -0
  216. periplus/packs/php@0.1.0/edges/find_calls.yaml +34 -0
  217. periplus/packs/php@0.1.0/edges/find_imports.yaml +18 -0
  218. periplus/packs/php@0.1.0/edges/find_member_access.yaml +22 -0
  219. periplus/packs/php@0.1.0/edges/find_structure.yaml +38 -0
  220. periplus/packs/php@0.1.0/embedded/embedded_regions.yaml +19 -0
  221. periplus/packs/php@0.1.0/imports/imports.yaml +20 -0
  222. periplus/packs/php@0.1.0/pack.yaml +117 -0
  223. periplus/packs/php@0.1.0/resolution/excluded_tokens.yaml +23 -0
  224. periplus/packs/php@0.1.0/resolution/resolution.yaml +35 -0
  225. periplus/packs/php@0.1.0/types/find_declarations.yaml +102 -0
  226. periplus/packs/php@0.1.0/types/node_types.yaml +55 -0
  227. periplus/packs/php_basic@0.2.0/edges/edge_kinds.yaml +48 -0
  228. periplus/packs/php_basic@0.2.0/edges/find_structure.yaml +750 -0
  229. periplus/packs/php_basic@0.2.0/imports/imports.yaml +19 -0
  230. periplus/packs/php_basic@0.2.0/pack.yaml +94 -0
  231. periplus/packs/php_basic@0.2.0/types/find_declarations.yaml +267 -0
  232. periplus/packs/php_basic@0.2.0/types/node_types.yaml +55 -0
  233. periplus/packs/profile_basic@0.0.1/bundle/profile_bundle_config.yaml +54 -0
  234. periplus/packs/profile_basic@0.0.1/pack.yaml +12 -0
  235. periplus/packs/salesforce_basic@0.0.1/event/salesforce_event.yaml +36 -0
  236. periplus/packs/salesforce_basic@0.0.1/pack.yaml +31 -0
  237. periplus/packs/salesforce_basic@0.0.1/salesforce_mapping/salesforce_mapping.yaml +19 -0
  238. periplus/packs/salesforce_basic@0.0.1/salesforce_mapping/salesforce_mapping_config.yaml +83 -0
  239. periplus/packs/salesforce_basic@0.0.1/salesforce_mapping_field/salesforce_mapping_field.yaml +8 -0
  240. periplus/packs/salesforce_basic@0.0.1/salesforce_mapping_field/salesforce_mapping_field_annotation.yaml +43 -0
  241. periplus/packs/twig@0.0.1/pack.yaml +26 -0
  242. periplus/packs/twig@0.0.1/types/template.yaml +57 -0
  243. periplus/packs/twig_basic@0.1.0/pack.yaml +11 -0
  244. periplus/packs/twig_tweak_basic@0.0.1/pack.yaml +27 -0
  245. periplus/packs/twig_tweak_basic@0.0.1/rules/block.yaml +20 -0
  246. periplus/packs/twig_tweak_basic@0.0.1/rules/entity.yaml +35 -0
  247. periplus/packs/twig_tweak_basic@0.0.1/rules/field.yaml +21 -0
  248. periplus/packs/twig_tweak_basic@0.0.1/rules/menu.yaml +21 -0
  249. periplus/packs/webform_basic@0.0.1/bundle/webform_submission_bundle_config.yaml +54 -0
  250. periplus/packs/webform_basic@0.0.1/pack.yaml +20 -0
  251. periplus/packs/webform_basic@0.0.1/webform_handler/webform_handler.yaml +8 -0
  252. periplus/packs/webform_basic@0.0.1/webform_handler/webform_handler_annotation.yaml +43 -0
  253. periplus/packs/yaml@0.0.1/pack.yaml +72 -0
  254. periplus/packs/yaml@0.0.1/types/find_mapping_entry.yaml +21 -0
  255. periplus/packs/yaml@0.0.1/types/yaml_types.yaml +44 -0
  256. periplus/packs/yaml_basic@0.1.0/pack.yaml +10 -0
  257. periplus/packs.py +447 -0
  258. periplus/preflight.py +102 -0
  259. periplus/py.typed +0 -0
  260. periplus/report.py +596 -0
  261. periplus/resolution.py +355 -0
  262. periplus/settings.py +617 -0
  263. periplus/settings.stub.yml +99 -0
  264. periplus/spec.py +774 -0
  265. periplus/update.py +197 -0
  266. periplus/validate.py +655 -0
  267. periplus_map-0.2.1.dist-info/METADATA +566 -0
  268. periplus_map-0.2.1.dist-info/RECORD +272 -0
  269. periplus_map-0.2.1.dist-info/WHEEL +4 -0
  270. periplus_map-0.2.1.dist-info/entry_points.txt +2 -0
  271. periplus_map-0.2.1.dist-info/licenses/LICENSE +202 -0
  272. periplus_map-0.2.1.dist-info/licenses/NOTICE +2 -0
@@ -0,0 +1,349 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # A PHP function or method that names a service or an entity type by a text literal in a call. The
4
+ # end is the call's first argument as written: a variable, a constant or a concatenation gives no
5
+ # edge and goes under skipped. A service or an entity type that no mapped file declares, such as
6
+ # config.factory or node, ends at a referenced node: Drupal core and contributed modules are
7
+ # outside the mapped code. A misspelled name reads referenced too.
8
+ #
9
+ # Limits:
10
+ # - Drupal is matched as written, with or without a leading backslash. An unqualified Drupal:: in
11
+ # a namespace with no use of Drupal also matches.
12
+ # - getStorage, getViewBuilder, getListBuilder, getFormObject and getAccessControlHandler count
13
+ # only when their object is written ending in entityTypeManager, as $this->entityTypeManager or
14
+ # \Drupal::entityTypeManager(); written $entity_type_manager; or written as the container's
15
+ # get('entity_type.manager') or \Drupal::service('entity_type.manager') with no space or line
16
+ # break inside. A manager under another name, reached through a property or promoted parameter
17
+ # of $this whose declared type is EntityTypeManager or EntityTypeManagerInterface, as
18
+ # $this->etm, joins by that type; one with no declared type, and a local variable such as $etm,
19
+ # make nothing. Other manager methods that take an entity type id, such as getHandler and
20
+ # getDefinition, make nothing.
21
+ # - A \Drupal:: shortcut such as \Drupal::currentUser(), and a static call on an entity class such
22
+ # as User::load(1), give an edge only for a name pack.yaml's tables list. An entity class is
23
+ # known by its short name, so a project class named as a core one, such as Drupal\mymod\Node,
24
+ # gives a false entity type.
25
+ # - get on the service container counts only when its object is written $container,
26
+ # $this->container, \Drupal::getContainer(), or getContainer() on $this, static or self, through
27
+ # -> or ?->. A container under another name and another letter case, such as ->GET('x'), make
28
+ # nothing, and a $container or $this->container that is not Drupal's service container gives a
29
+ # false service.
30
+
31
+ # A call on a property of $this to a manager method that takes an entity type id, with its
32
+ # argument list as written: <class>::<method>::$this-><name>-><called method>(<arguments>).
33
+ node_types:
34
+ - name: drupal.manager_call
35
+ id_namespace: drupal.manager_call
36
+
37
+ edge_kinds:
38
+ - kind: manager_call_in
39
+ from: drupal.manager_call
40
+ to: php.method
41
+ - kind: uses_service
42
+ from: [php.function, php.method]
43
+ to: drupal.service
44
+ - kind: uses_entity_type
45
+ from: [php.function, php.method]
46
+ to: drupal.entity_type
47
+
48
+ rules:
49
+ # \Drupal::service('my_module.helper').
50
+ - rule: service_call
51
+ reads: file
52
+ in: [source]
53
+ match:
54
+ reference: scoped_call_expression
55
+ name_child: [scope, name]
56
+ filetype: php
57
+ where:
58
+ - name_matches: {child: scope, pattern: '\\?Drupal'}
59
+ - name_matches: {child: name, pattern: service}
60
+ emits:
61
+ - edge:
62
+ kind: uses_service
63
+ from: enclosing_declaration
64
+ to: {from: {argument: 0}, types: [drupal.service]}
65
+ confidence: declared
66
+
67
+ # $container->get('my_module.helper') in create(), $this->container->get('path.current') in a
68
+ # test, and $this->getContainer()->get('x'), static::getContainer() or self::getContainer().
69
+ # Inferred: the object's name, not its type, says it is the service container.
70
+ - rule: container_get_call
71
+ reads: file
72
+ in: [source]
73
+ match:
74
+ reference: member_call_expression
75
+ name_child: name
76
+ filetype: php
77
+ where:
78
+ - name_matches: {child: object, pattern: '\$container|\$this->(?:container|getContainer\(\))|(?:\\?Drupal|static|self)::getContainer\(\)'}
79
+ - name_matches: {child: name, pattern: get}
80
+ emits:
81
+ - edge:
82
+ kind: uses_service
83
+ from: enclosing_declaration
84
+ to: {from: {argument: 0}, types: [drupal.service]}
85
+ confidence: inferred
86
+
87
+ # $container?->get('my_module.helper'), as container_get_call.
88
+ - rule: container_nullsafe_get_call
89
+ reads: file
90
+ in: [source]
91
+ match:
92
+ reference: nullsafe_member_call_expression
93
+ name_child: name
94
+ filetype: php
95
+ where:
96
+ - name_matches: {child: object, pattern: '\$container|\$this->(?:container|getContainer\(\))|(?:\\?Drupal|static|self)::getContainer\(\)'}
97
+ - name_matches: {child: name, pattern: get}
98
+ emits:
99
+ - edge:
100
+ kind: uses_service
101
+ from: enclosing_declaration
102
+ to: {from: {argument: 0}, types: [drupal.service]}
103
+ confidence: inferred
104
+
105
+ # \Drupal::entityQuery('node') and \Drupal::entityQueryAggregate('node').
106
+ - rule: entity_query_call
107
+ reads: file
108
+ in: [source]
109
+ match:
110
+ reference: scoped_call_expression
111
+ name_child: [scope, name]
112
+ filetype: php
113
+ where:
114
+ - name_matches: {child: scope, pattern: '\\?Drupal'}
115
+ - name_matches: {child: name, pattern: 'entityQuery(?:Aggregate)?'}
116
+ emits:
117
+ - edge:
118
+ kind: uses_entity_type
119
+ from: enclosing_declaration
120
+ to: {from: {argument: 0}, types: [drupal.entity_type]}
121
+ confidence: declared
122
+
123
+ # $this->entityTypeManager->getStorage('node'). Inferred: the object's name, not its type, says it
124
+ # is the entity type manager.
125
+ - rule: storage_call
126
+ reads: file
127
+ in: [source]
128
+ match:
129
+ reference: member_call_expression
130
+ name_child: name
131
+ filetype: php
132
+ where:
133
+ - name_matches: {child: object, pattern: '(?s).*entityTypeManager(?:\(\))?'}
134
+ - name_matches: {child: name, pattern: getStorage}
135
+ emits:
136
+ - edge:
137
+ kind: uses_entity_type
138
+ from: enclosing_declaration
139
+ to: {from: {argument: 0}, types: [drupal.entity_type]}
140
+ confidence: inferred
141
+
142
+ # $this->entityTypeManager?->getStorage('node').
143
+ - rule: storage_nullsafe_call
144
+ reads: file
145
+ in: [source]
146
+ match:
147
+ reference: nullsafe_member_call_expression
148
+ name_child: name
149
+ filetype: php
150
+ where:
151
+ - name_matches: {child: object, pattern: '(?s).*entityTypeManager(?:\(\))?'}
152
+ - name_matches: {child: name, pattern: getStorage}
153
+ emits:
154
+ - edge:
155
+ kind: uses_entity_type
156
+ from: enclosing_declaration
157
+ to: {from: {argument: 0}, types: [drupal.entity_type]}
158
+ confidence: inferred
159
+
160
+ # $this->entityTypeManager->getViewBuilder('node'), and getListBuilder, getFormObject and
161
+ # getAccessControlHandler, which take an entity type id first as getStorage does. Inferred, as
162
+ # storage_call.
163
+ - rule: entity_handler_call
164
+ reads: file
165
+ in: [source]
166
+ match:
167
+ reference: member_call_expression
168
+ name_child: name
169
+ filetype: php
170
+ where:
171
+ - name_matches: {child: object, pattern: '(?s).*entityTypeManager(?:\(\))?'}
172
+ - name_matches: {child: name, pattern: 'getViewBuilder|getListBuilder|getFormObject|getAccessControlHandler'}
173
+ emits:
174
+ - edge:
175
+ kind: uses_entity_type
176
+ from: enclosing_declaration
177
+ to: {from: {argument: 0}, types: [drupal.entity_type]}
178
+ confidence: inferred
179
+
180
+ # $this->container->get('entity_type.manager')->getStorage('node') in a test, and the same on
181
+ # $container, \Drupal::getContainer() or \Drupal::service('entity_type.manager'), for getStorage and
182
+ # the four handler methods above. Inferred: the container is known by its name, as in
183
+ # container_get_call.
184
+ - rule: container_entity_call
185
+ reads: file
186
+ in: [source]
187
+ match:
188
+ reference: member_call_expression
189
+ name_child: name
190
+ filetype: php
191
+ where:
192
+ - name_matches: {child: object, pattern: '(?:\$container|\$this->container|\\?Drupal::getContainer\(\))->get\([''"]entity_type\.manager[''"]\)|\\?Drupal::service\([''"]entity_type\.manager[''"]\)'}
193
+ - name_matches: {child: name, pattern: 'getStorage|getViewBuilder|getListBuilder|getFormObject|getAccessControlHandler'}
194
+ emits:
195
+ - edge:
196
+ kind: uses_entity_type
197
+ from: enclosing_declaration
198
+ to: {from: {argument: 0}, types: [drupal.entity_type]}
199
+ confidence: inferred
200
+
201
+ # $entity_type_manager->getStorage('user'), a local variable or parameter named in snake case.
202
+ # Inferred: the variable's name says it is the entity type manager.
203
+ - rule: local_manager_entity_call
204
+ reads: file
205
+ in: [source]
206
+ match:
207
+ reference: member_call_expression
208
+ name_child: name
209
+ filetype: php
210
+ where:
211
+ - name_matches: {child: object, pattern: '\$entity_type_manager'}
212
+ - name_matches: {child: name, pattern: 'getStorage|getViewBuilder|getListBuilder|getFormObject|getAccessControlHandler'}
213
+ emits:
214
+ - edge:
215
+ kind: uses_entity_type
216
+ from: enclosing_declaration
217
+ to: {from: {argument: 0}, types: [drupal.entity_type]}
218
+ confidence: inferred
219
+
220
+ # $this->etm->getStorage('node') and the four handler methods, on any property of $this, as a
221
+ # drupal.manager_call node that carries the argument list, and its edge to the method around it.
222
+ # entity_call_through_typed_manager reads the property's declared type.
223
+ - rule: manager_call
224
+ reads: file
225
+ in: [source]
226
+ match:
227
+ declaration: member_call_expression
228
+ name_child: object
229
+ filetype: php
230
+ where:
231
+ - name_matches: {child: object, pattern: '\$this->\w+'}
232
+ - name_matches: {child: name, pattern: 'getStorage|getViewBuilder|getListBuilder|getFormObject|getAccessControlHandler'}
233
+ id:
234
+ from: [enclosing_type, enclosing_method, declared_name, name, arguments]
235
+ template: "{enclosing_type}::{enclosing_method}::{declared_name}->{name}{arguments}"
236
+ emits: [{node: {type: drupal.manager_call}}]
237
+ confidence: declared
238
+
239
+ - rule: manager_call_in
240
+ reads: file
241
+ in: [source]
242
+ match:
243
+ declaration: member_call_expression
244
+ name_child: object
245
+ filetype: php
246
+ where:
247
+ - name_matches: {child: object, pattern: '\$this->\w+'}
248
+ - name_matches: {child: name, pattern: 'getStorage|getViewBuilder|getListBuilder|getFormObject|getAccessControlHandler'}
249
+ id:
250
+ from: [enclosing_type, enclosing_method, declared_name, name, arguments]
251
+ template: "{enclosing_type}::{enclosing_method}::{declared_name}->{name}{arguments}"
252
+ emits: [{edge: {kind: manager_call_in, from: this_node, to: enclosing_method}}]
253
+ confidence: declared
254
+
255
+ # $this->etm?->getStorage('node'), as manager_call.
256
+ - rule: manager_nullsafe_call
257
+ reads: file
258
+ in: [source]
259
+ match:
260
+ declaration: nullsafe_member_call_expression
261
+ name_child: object
262
+ filetype: php
263
+ where:
264
+ - name_matches: {child: object, pattern: '\$this->\w+'}
265
+ - name_matches: {child: name, pattern: 'getStorage|getViewBuilder|getListBuilder|getFormObject|getAccessControlHandler'}
266
+ id:
267
+ from: [enclosing_type, enclosing_method, declared_name, name, arguments]
268
+ template: "{enclosing_type}::{enclosing_method}::{declared_name}->{name}{arguments}"
269
+ emits: [{node: {type: drupal.manager_call}}]
270
+ confidence: declared
271
+
272
+ - rule: manager_nullsafe_call_in
273
+ reads: file
274
+ in: [source]
275
+ match:
276
+ declaration: nullsafe_member_call_expression
277
+ name_child: object
278
+ filetype: php
279
+ where:
280
+ - name_matches: {child: object, pattern: '\$this->\w+'}
281
+ - name_matches: {child: name, pattern: 'getStorage|getViewBuilder|getListBuilder|getFormObject|getAccessControlHandler'}
282
+ id:
283
+ from: [enclosing_type, enclosing_method, declared_name, name, arguments]
284
+ template: "{enclosing_type}::{enclosing_method}::{declared_name}->{name}{arguments}"
285
+ emits: [{edge: {kind: manager_call_in, from: this_node, to: enclosing_method}}]
286
+ confidence: declared
287
+
288
+ # A manager call to the entity type its first argument names in quotes, when the call's class or
289
+ # its nearest ancestor that declares the property types it EntityTypeManager or
290
+ # EntityTypeManagerInterface: on the property or on a promoted constructor parameter. The edge runs
291
+ # from the method around the call, at the call's line. Inferred, as storage_call: the declared type
292
+ # is a claim about what runs.
293
+ - rule: entity_call_through_typed_manager
294
+ reads: map
295
+ match:
296
+ node_type: drupal.manager_call
297
+ where: [{id_matches: '^drupal\.manager_call::(?<call>(?<class>[^:]+)::[^:]+::\$this->(?<member>\w+)->\w+\(\s*[''"](?<entity>\w+)[''"].*\))$'}]
298
+ follow:
299
+ - node: 'php.type::{class}'
300
+ - ancestors: [inherits]
301
+ - id_matches: '^php\.type::(?<owner>.+)$'
302
+ - node: 'php.property::{owner}::${member}'
303
+ - edge: property_typed_as
304
+ - id_matches: '^php\.property_type::[^:]+::\$\w+::\\?(?:Drupal\\Core\\Entity\\)?EntityTypeManager(?:Interface)?$'
305
+ - node: 'drupal.manager_call::{call}'
306
+ - edge: manager_call_in
307
+ emits: [{edge: {kind: uses_entity_type, from: matched_node, to: {template: "{entity}", types: [drupal.entity_type]}}}]
308
+ confidence: inferred
309
+
310
+ # \Drupal::logger('my_module'), \Drupal::currentUser() and the other shortcuts, to the service the
311
+ # table shortcut_services gives for the method's name. Inferred: the table, not the file, names the
312
+ # service. The methods other rules read, and getContainer, are left to them.
313
+ - rule: drupal_shortcut_call
314
+ reads: file
315
+ in: [source]
316
+ match:
317
+ reference: scoped_call_expression
318
+ name_child: [scope, name]
319
+ filetype: php
320
+ where:
321
+ - name_matches: {child: scope, pattern: '\\?Drupal'}
322
+ - name_matches: {child: name, pattern: '(?!(?:service|getContainer|entityQuery(?:Aggregate)?)$)\w+'}
323
+ emits:
324
+ - edge:
325
+ kind: uses_service
326
+ from: enclosing_declaration
327
+ to: {resolve: [lookup_last_segment_in: shortcut_services], types: [drupal.service]}
328
+ confidence: inferred
329
+
330
+ # User::load(1), Node::loadMultiple() and Term::create([...]), to the entity type the table
331
+ # entity_classes gives for the class's short name: the last segment of the class's full name, as
332
+ # a use binds it or the namespace prefixes it. Inferred: the table, not the file, names the entity
333
+ # type. static::, self:: and parent:: are not read.
334
+ - rule: entity_class_static_call
335
+ reads: file
336
+ in: [source]
337
+ match:
338
+ reference: scoped_call_expression
339
+ name_child: scope
340
+ filetype: php
341
+ where:
342
+ - name_matches: {child: scope, pattern: '\\?(?:\w+\\)*[A-Z]\w*'}
343
+ - name_matches: {child: name, pattern: 'load|loadMultiple|create'}
344
+ emits:
345
+ - edge:
346
+ kind: uses_entity_type
347
+ from: enclosing_declaration
348
+ to: {resolve: [lookup_last_segment_in: entity_classes], types: [drupal.entity_type]}
349
+ confidence: inferred
@@ -0,0 +1,30 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # A single-directory component, named by its component file: way_card.component is way_card.
4
+
5
+ node_types:
6
+ - name: drupal.component
7
+ id_namespace: drupal.component
8
+
9
+ rules:
10
+ - rule: component_file
11
+ reads: file
12
+ in:
13
+ - module_root
14
+ - theme_root
15
+ match:
16
+ file: '*.component'
17
+ filetype: yaml
18
+ id:
19
+ from: file_stem
20
+ normalize:
21
+ - replace: \.component$
22
+ with: ''
23
+ emits:
24
+ - node:
25
+ type: drupal.component
26
+ - attribute:
27
+ name: name
28
+ from:
29
+ key: name
30
+ confidence: declared
@@ -0,0 +1,119 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # Every file in the config folders becomes a node, and a rule that understands more refines it.
4
+ # Its dependencies key lists modules, configuration and themes, and its enforced key the same
5
+ # three lists; an enforced dependency is a dependency, each cited at its item's line. A file with
6
+ # no top-level uuid, in the site's exported configuration folder, is simple configuration,
7
+ # provided by the module its name starts with; a configuration entity (it has a uuid) has no owner
8
+ # edge. Drupal strips the uuid from a module's config/install and config/optional files, so the
9
+ # test cannot tell the two apart there and those files get no owner edge. core.* names no module.
10
+ node_types:
11
+ - name: drupal.config_object
12
+ id_namespace: drupal.config
13
+
14
+ edge_kinds:
15
+ - kind: config_depends
16
+ from: drupal.config_object
17
+ to: drupal.config_object
18
+ - kind: depends_on_module
19
+ from:
20
+ - drupal.module
21
+ - drupal.config_object
22
+ to: drupal.module
23
+ - kind: depends_on_theme
24
+ from: drupal.config_object
25
+ to: drupal.theme
26
+ - kind: config_provided_by
27
+ from: drupal.config_object
28
+ to: drupal.module
29
+
30
+ rules:
31
+ - rule: any_config_file
32
+ reads: file
33
+ in:
34
+ - config
35
+ - module_config
36
+ match:
37
+ file: '*'
38
+ filetype: yaml
39
+ id:
40
+ from: file_stem
41
+ emits:
42
+ - node:
43
+ type: drupal.config_object
44
+ confidence: declared
45
+ - rule: any_config_file_edges
46
+ reads: file
47
+ in:
48
+ - config
49
+ - module_config
50
+ match:
51
+ file: '*'
52
+ filetype: yaml
53
+ id:
54
+ from: file_stem
55
+ emits:
56
+ - edge:
57
+ kind: config_depends
58
+ from: this_node
59
+ to:
60
+ from:
61
+ key: dependencies.config
62
+ each: true
63
+ - edge:
64
+ kind: depends_on_module
65
+ from: this_node
66
+ to:
67
+ from:
68
+ key: dependencies.module
69
+ each: true
70
+ - edge:
71
+ kind: config_depends
72
+ from: this_node
73
+ to:
74
+ from:
75
+ key: dependencies.enforced.config
76
+ each: true
77
+ - edge:
78
+ kind: depends_on_module
79
+ from: this_node
80
+ to:
81
+ from:
82
+ key: dependencies.enforced.module
83
+ each: true
84
+ - edge:
85
+ kind: depends_on_theme
86
+ from: this_node
87
+ to:
88
+ from:
89
+ key: dependencies.theme
90
+ each: true
91
+ - edge:
92
+ kind: depends_on_theme
93
+ from: this_node
94
+ to:
95
+ from:
96
+ key: dependencies.enforced.theme
97
+ each: true
98
+ confidence: declared
99
+ - rule: simple_config_owner
100
+ reads: file
101
+ in:
102
+ - config
103
+ match:
104
+ file: '*'
105
+ filetype: yml
106
+ where:
107
+ - key:
108
+ name: uuid
109
+ equals: null
110
+ id:
111
+ from: file_stem
112
+ emits:
113
+ - edge:
114
+ kind: config_provided_by
115
+ from: this_node
116
+ to:
117
+ from: []
118
+ template: '{config_owner}'
119
+ confidence: declared
@@ -0,0 +1,8 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # A validation constraint plugin, named by its plugin id; plugin_class joins it to its class.
4
+
5
+ node_types:
6
+ - name: drupal.constraint_plugin
7
+ parent: drupal.plugin
8
+ id_namespace: drupal.plugin.constraint
@@ -0,0 +1,43 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # A validation constraint plugin declared by the Constraint docblock annotation on its class. Two
4
+ # rules because a rule that emits an edge emits no node. An id that is not text in double quotes
5
+ # makes no plugin and is listed under skipped in the map report.
6
+
7
+ rules:
8
+ - rule: constraint_from_annotation
9
+ reads: file
10
+ in:
11
+ - constraint_classes
12
+ match:
13
+ annotation: Constraint
14
+ filetype: php
15
+ where:
16
+ - applies_to: class_declaration
17
+ id:
18
+ from:
19
+ annotation_key: id
20
+ must_be: string_literal
21
+ emits:
22
+ - node:
23
+ type: drupal.constraint_plugin
24
+ confidence: declared
25
+ - rule: constraint_from_annotation_edges
26
+ reads: file
27
+ in:
28
+ - constraint_classes
29
+ match:
30
+ annotation: Constraint
31
+ filetype: php
32
+ where:
33
+ - applies_to: class_declaration
34
+ id:
35
+ from:
36
+ annotation_key: id
37
+ must_be: string_literal
38
+ emits:
39
+ - edge:
40
+ kind: plugin_class
41
+ from: this_node
42
+ to: enclosing_class
43
+ confidence: declared
@@ -0,0 +1,43 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # A validation constraint plugin declared by the Constraint attribute on its class, the twin of the
4
+ # annotation rule. Two rules because a rule that emits an edge emits no node. An id that is not a
5
+ # text literal makes no plugin and is listed under skipped.
6
+
7
+ rules:
8
+ - rule: constraint_from_attribute
9
+ reads: file
10
+ in:
11
+ - constraint_classes
12
+ match:
13
+ attribute: Drupal\Core\Validation\Attribute\Constraint
14
+ filetype: php
15
+ where:
16
+ - applies_to: class_declaration
17
+ id:
18
+ from:
19
+ attribute_argument: id
20
+ must_be: string_literal
21
+ emits:
22
+ - node:
23
+ type: drupal.constraint_plugin
24
+ confidence: declared
25
+ - rule: constraint_from_attribute_edges
26
+ reads: file
27
+ in:
28
+ - constraint_classes
29
+ match:
30
+ attribute: Drupal\Core\Validation\Attribute\Constraint
31
+ filetype: php
32
+ where:
33
+ - applies_to: class_declaration
34
+ id:
35
+ from:
36
+ attribute_argument: id
37
+ must_be: string_literal
38
+ emits:
39
+ - edge:
40
+ kind: plugin_class
41
+ from: this_node
42
+ to: enclosing_class
43
+ confidence: declared
@@ -0,0 +1,30 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # A display says how a bundle is edited or rendered, one config object per mode. A form display
4
+ # and a view display of one bundle carry the same internal id, so the id comes from the file name.
5
+ # A view mode or a form mode is the config object core.entity_view_mode.<entity type>.<mode>; the
6
+ # mode default has no config object, so a display in it has no in_mode edge.
7
+
8
+ node_types:
9
+ - name: drupal.form_display
10
+ parent: drupal.config_object
11
+ - name: drupal.view_display
12
+ parent: drupal.config_object
13
+ - name: drupal.form_mode
14
+ parent: drupal.config_object
15
+ - name: drupal.view_mode
16
+ parent: drupal.config_object
17
+
18
+ edge_kinds:
19
+ - kind: displays
20
+ from: [drupal.form_display, drupal.view_display]
21
+ to: drupal.bundle
22
+ - kind: shows_field
23
+ from: [drupal.form_display, drupal.view_display]
24
+ to: drupal.field_instance
25
+ - kind: in_mode
26
+ from: [drupal.form_display, drupal.view_display]
27
+ to: [drupal.form_mode, drupal.view_mode]
28
+ - kind: mode_of
29
+ from: [drupal.form_mode, drupal.view_mode]
30
+ to: drupal.entity_type