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,52 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — declares the block plugin types and their edges. Finds nothing.
4
+ #
5
+ # A block plugin is NOT the class that implements it, and that is the finding this whole
6
+ # directory is shaped around. Three cases in one module force it:
7
+ #
8
+ # one class, many plugins DerivedBlock.php:20-25 names a deriver, and the deriver
9
+ # returns one plugin per content type
10
+ # many plugins, no class views_block:block_ways_recent-block_1 is declared by
11
+ # views.view.block_ways_recent.yml:89 and implemented by core's
12
+ # ViewsBlock. Nothing first-party has a class.
13
+ # a class discovery misses AlteredBlock.php:19 has no attribute and no annotation and
14
+ # sits outside src/Plugin/Block/. Only the hook makes it exist.
15
+ #
16
+ # So plugin and class are separate nodes, joined by an edge.
17
+
18
+ node_types:
19
+
20
+ - name: drupal.plugin
21
+ abstract: true
22
+ id_namespace: drupal.plugin
23
+
24
+ - name: drupal.block_plugin
25
+ parent: drupal.plugin
26
+ id_namespace: drupal.plugin.block
27
+
28
+ - name: drupal.plugin_deriver
29
+ parent: php.class
30
+
31
+ edge_kinds:
32
+
33
+ - kind: plugin_class
34
+ from: drupal.plugin
35
+ to: php.class
36
+ # What code runs for this plugin. Absent where the class is behind the boundary and
37
+ # nothing first-party names it, and that absence is accurate rather than a gap.
38
+
39
+ - kind: declares
40
+ from: [php.class, php.callable, drupal.config_object]
41
+ to: drupal.plugin
42
+ # Where the declaration is written, which is a different question from which class runs
43
+ # and often a different file. For an attribute the two edges join the same pair in
44
+ # opposite directions; for block_ways_altered they do not.
45
+
46
+ - kind: deriver_class
47
+ from: drupal.plugin
48
+ to: php.class
49
+
50
+ - kind: derived_from
51
+ from: drupal.plugin
52
+ to: drupal.plugin
@@ -0,0 +1,61 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — block plugin added by an alter hook. One rule.
4
+ #
5
+ # The bottom of the findability gradient among mechanisms that can be found at all. The id
6
+ # is a string key in an array literal, inside a method body, in a class that has no
7
+ # relationship to the class the plugin actually uses.
8
+
9
+ needs:
10
+ types:
11
+ - drupal.block_plugin
12
+ rules:
13
+ - rule: block_plugin_from_alter_hook
14
+ reads: file
15
+ in:
16
+ - custom_module
17
+ - custom_theme
18
+ match:
19
+ subscript_assignment: true
20
+ where:
21
+ - in_method_with_attribute: Drupal\Core\Hook\Attribute\Hook
22
+ - attribute_argument:
23
+ index: 0
24
+ equals: block_alter
25
+ id: &id001
26
+ from: subscript_key
27
+ must_be: string_literal
28
+ on_miss: unresolved
29
+ emits:
30
+ - node:
31
+ type: drupal.block_plugin
32
+ - attribute:
33
+ name: admin_label
34
+ from:
35
+ array_key: admin_label
36
+ confidence: inferred
37
+ - rule: block_plugin_from_alter_hook_edges
38
+ reads: file
39
+ in:
40
+ - custom_module
41
+ - custom_theme
42
+ match:
43
+ subscript_assignment: true
44
+ where:
45
+ - in_method_with_attribute: Drupal\Core\Hook\Attribute\Hook
46
+ - attribute_argument:
47
+ index: 0
48
+ equals: block_alter
49
+ emits:
50
+ - edge:
51
+ kind: declares
52
+ from: enclosing_callable
53
+ to: this_node
54
+ - edge:
55
+ kind: plugin_class
56
+ from: this_node
57
+ to:
58
+ from:
59
+ array_key_class: class
60
+ confidence: inferred
61
+ id: *id001
@@ -0,0 +1,69 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — block plugin declared by a docblock annotation. One rule.
4
+ #
5
+ # The pre-attribute form, still read in Drupal 11. Verified at
6
+ # web/core/lib/Drupal/Core/Block/BlockManager.php:49, which passes both:
7
+ #
8
+ # parent::__construct('Plugin/Block', $namespaces, $module_handler,
9
+ # BlockPluginInterface::class, Block::class, 'Drupal\Core\Block\Annotation\Block');
10
+ #
11
+ # One manager, two discovery forms. A pack supporting only attributes maps new core
12
+ # correctly and loses most of contrib.
13
+ #
14
+ # Supplementary to block_plugin_attribute.yaml, and in practice they never meet — a class
15
+ # carries one form or the other. They are two rules because the shapes differ, not because
16
+ # a class might have both.
17
+
18
+ needs:
19
+ types:
20
+ - drupal.block_plugin
21
+ rules:
22
+ - rule: block_plugin_from_annotation
23
+ reads: file
24
+ in:
25
+ - custom_module
26
+ - custom_theme
27
+ match:
28
+ annotation: Block
29
+ grammar: doctrine-annotation
30
+ where:
31
+ - applies_to: class_declaration
32
+ id: &id001
33
+ from:
34
+ annotation_key: id
35
+ must_be: string_literal
36
+ on_miss: unresolved
37
+ emits:
38
+ - node:
39
+ type: drupal.block_plugin
40
+ - attribute:
41
+ name: admin_label
42
+ from:
43
+ annotation_key: admin_label
44
+ - attribute:
45
+ name: category
46
+ from:
47
+ annotation_key: category
48
+ confidence: declared
49
+ - rule: block_plugin_from_annotation_edges
50
+ reads: file
51
+ in:
52
+ - custom_module
53
+ - custom_theme
54
+ match:
55
+ annotation: Block
56
+ grammar: doctrine-annotation
57
+ where:
58
+ - applies_to: class_declaration
59
+ emits:
60
+ - edge:
61
+ kind: declares
62
+ from: enclosing_class
63
+ to: this_node
64
+ - edge:
65
+ kind: plugin_class
66
+ from: this_node
67
+ to: enclosing_class
68
+ confidence: declared
69
+ id: *id001
@@ -0,0 +1,56 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — block plugin declared by a PHP attribute. One rule.
4
+ #
5
+ # The current recommended form and the only one core writes in new code.
6
+
7
+ needs:
8
+ types:
9
+ - drupal.block_plugin
10
+ rules:
11
+ - rule: block_plugin_from_attribute
12
+ reads: file
13
+ in:
14
+ - custom_module
15
+ - custom_theme
16
+ match:
17
+ attribute: Drupal\Core\Block\Attribute\Block
18
+ where:
19
+ - applies_to: class_declaration
20
+ id: &id001
21
+ from:
22
+ attribute_argument: id
23
+ must_be: string_literal
24
+ on_miss: unresolved
25
+ emits:
26
+ - node:
27
+ type: drupal.block_plugin
28
+ - attribute:
29
+ name: admin_label
30
+ from:
31
+ attribute_argument: admin_label
32
+ - attribute:
33
+ name: category
34
+ from:
35
+ attribute_argument: category
36
+ confidence: declared
37
+ - rule: block_plugin_from_attribute_edges
38
+ reads: file
39
+ in:
40
+ - custom_module
41
+ - custom_theme
42
+ match:
43
+ attribute: Drupal\Core\Block\Attribute\Block
44
+ where:
45
+ - applies_to: class_declaration
46
+ emits:
47
+ - edge:
48
+ kind: declares
49
+ from: enclosing_class
50
+ to: this_node
51
+ - edge:
52
+ kind: plugin_class
53
+ from: this_node
54
+ to: enclosing_class
55
+ confidence: declared
56
+ id: *id001
@@ -0,0 +1,46 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — the block plugin whose id does not exist until content is saved. One rule
4
+ # that fires and fails, on purpose.
5
+ #
6
+ # Kept as a file rather than deleted, because a pack has to be able to say "this is out of
7
+ # reach, and here is why" in a form the map can carry. Deleting it leaves a silent hole; a
8
+ # rule that guessed would put a fabricated id into a committed artifact.
9
+
10
+ needs:
11
+ types: [drupal.block_plugin]
12
+
13
+ rules:
14
+
15
+ - rule: content_block_plugin_id
16
+ reads: file
17
+ in: [custom_module]
18
+ match:
19
+ static_call: "Drupal\\block\\Entity\\Block::create"
20
+ argument: 0
21
+ id:
22
+ from: {argument_key: plugin}
23
+ must_be: string_literal
24
+ on_miss: out_of_reach
25
+ emits:
26
+ - node: {type: drupal.block_plugin}
27
+ confidence: declared
28
+ # Verified: block_ways.install:41 'plugin' => 'block_content:' . $note->uuid(),
29
+ # A concatenation, not a literal. The uuid comes from a content entity saved seven lines
30
+ # earlier, and core keys the derivative by exactly that value:
31
+ # block_content/src/Plugin/Derivative/BlockContent.php:51
32
+ # $this->derivatives[$block_content->uuid()] = $base_plugin_definition;
33
+ #
34
+ # `on_miss: out_of_reach`, not `unresolved`. Unresolved says a rule looked and failed,
35
+ # which invites somebody to fix what is not broken. This target is not code, is not in
36
+ # the repository, and has a different identifier on every install. No pack change
37
+ # reaches it.
38
+ #
39
+ # A second, independent instance of the same shape sits in the same module:
40
+ # block_ways.links.menu.yml:4 url: 'https://www.drupal.org/docs/drupal-apis/block-api'
41
+ # Two unrelated cases in one small module is the argument for this being its own state
42
+ # rather than an attribute on an edge.
43
+ #
44
+ # The same rule succeeds four lines earlier on the placement:
45
+ # block_ways.install:37 'id' => 'block_ways_6_content',
46
+ # One Block::create, one id resolved and one not.
@@ -0,0 +1,110 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — the plugins core's derivers produce. Two plain rules, one per deriver.
4
+ #
5
+ # There was a generic `enumerate` mechanism here and it could never have worked. A deriver's
6
+ # key format is PHP inside the deriver class, and no generic rule reads that:
7
+ #
8
+ # views/src/Plugin/Derivative/ViewsBlock.php:88 $view->id() . '-' . $display['id']
9
+ # system/src/Plugin/Derivative/SystemMenuBlock.php:48 the menu id
10
+ # block_content/src/Plugin/Derivative/BlockContent.php:51 the content entity uuid
11
+ #
12
+ # The pack has to state each one anyway, so it states them as ordinary rules. A config
13
+ # object goes in, a plugin id comes out. Nothing new in the format.
14
+
15
+ needs:
16
+ types:
17
+ - drupal.block_plugin
18
+ - drupal.config_object
19
+ rules:
20
+ - rule: views_block_from_display
21
+ reads: map
22
+ match:
23
+ node_type: drupal.config_object
24
+ where:
25
+ - id_matches: ^views\.view\.(?<view>[a-z0-9_]+)$
26
+ - has_key:
27
+ path: display.*
28
+ where:
29
+ display_plugin: block
30
+ id: &id001
31
+ from:
32
+ - capture: view
33
+ - each_key: display.*
34
+ template: drupal.plugin.block::views_block:{view}-{each_key}
35
+ emits:
36
+ - node:
37
+ type: drupal.block_plugin
38
+ confidence: declared
39
+ - rule: menu_block_from_menu
40
+ reads: map
41
+ match:
42
+ node_type: drupal.config_object
43
+ where:
44
+ - id_matches: ^system\.menu\.(?<menu>[a-z0-9_-]+)$
45
+ id: &id002
46
+ from:
47
+ capture: menu
48
+ template: drupal.plugin.block::system_menu_block:{menu}
49
+ emits:
50
+ - node:
51
+ type: drupal.block_plugin
52
+ confidence: declared
53
+ - rule: views_block_from_display_edges
54
+ reads: map
55
+ match:
56
+ node_type: drupal.config_object
57
+ where:
58
+ - id_matches: ^views\.view\.(?<view>[a-z0-9_]+)$
59
+ - has_key:
60
+ path: display.*
61
+ where:
62
+ display_plugin: block
63
+ emits:
64
+ - edge:
65
+ kind: derived_from
66
+ from: this_node
67
+ to:
68
+ from:
69
+ literal: drupal.plugin.block::views_block
70
+ - edge:
71
+ kind: declares
72
+ from: source_node
73
+ to: this_node
74
+ confidence: declared
75
+ id: *id001
76
+ - rule: menu_block_from_menu_edges
77
+ reads: map
78
+ match:
79
+ node_type: drupal.config_object
80
+ where:
81
+ - id_matches: ^system\.menu\.(?<menu>[a-z0-9_-]+)$
82
+ emits:
83
+ - edge:
84
+ kind: derived_from
85
+ from: this_node
86
+ to:
87
+ from:
88
+ literal: drupal.plugin.block::system_menu_block
89
+ - edge:
90
+ kind: declares
91
+ from: source_node
92
+ to: this_node
93
+ confidence: declared
94
+ id: *id002
95
+ - rule: derivative_from_reference
96
+ reads: map
97
+ match:
98
+ node_type: drupal.block_plugin
99
+ where:
100
+ - id_matches: ^drupal\.plugin\.block::(?<base>[a-z0-9_]+):(?<key>.+)$
101
+ - base_is_known_plugin: true
102
+ emits:
103
+ - edge:
104
+ kind: derived_from
105
+ from: this_node
106
+ to:
107
+ from:
108
+ capture: base
109
+ template: drupal.plugin.block::{base}
110
+ confidence: declared
@@ -0,0 +1,30 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — the base plugin that names a deriver. One rule.
4
+ #
5
+ # The base plugin itself is found by block_plugin_attribute.yaml. This adds only the edge to
6
+ # the deriver class, so it is supplementary to that rule and lands on the same node.
7
+
8
+ needs:
9
+ types: [drupal.block_plugin]
10
+
11
+ rules:
12
+
13
+ - rule: deriver_argument
14
+ reads: file
15
+ in: [custom_module, custom_theme]
16
+ match:
17
+ attribute: "Drupal\\Core\\Block\\Attribute\\Block"
18
+ where:
19
+ - has_argument: deriver
20
+ id:
21
+ from: {attribute_argument: id}
22
+ must_be: string_literal
23
+ emits:
24
+ - edge: {kind: deriver_class, from: this_node, to: {from: {argument_class: deriver}}}
25
+ confidence: declared
26
+ # Verified first-party: DerivedBlock.php:20-25, deriver: NodeTypeBlockDeriver::class.
27
+ # Verified in core, the same shape three times:
28
+ # modules/views/src/Plugin/Block/ViewsBlock.php:17,19
29
+ # modules/system/src/Plugin/Block/SystemMenuBlock.php:21,24
30
+ # modules/block_content/src/Plugin/Block/BlockContentBlock.php:24,27
@@ -0,0 +1,14 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — declares the block type. Finds nothing.
4
+ #
5
+ # A block type is a bundle: it says what fields a content block has.
6
+ #
7
+ # Drupal makes one three ways, and the sibling files here each cover one way. This file
8
+ # only says the type exists, so that a typo in a sibling fails the build instead of
9
+ # minting a type nothing ever finds.
10
+
11
+ node_types:
12
+
13
+ - name: drupal.block_type
14
+ id_namespace: drupal.block_type
@@ -0,0 +1,43 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — block type created by PHP. One rule.
4
+ #
5
+ # Supplementary to block_type_config.yaml: neither needs the other, and they land on one
6
+ # node only because both mint the same id. If they minted different ids there would be two
7
+ # nodes, the map would look full, and nothing would report it.
8
+
9
+ needs:
10
+ types:
11
+ - drupal.block_type
12
+ rules:
13
+ - rule: block_type_from_code
14
+ reads: file
15
+ in:
16
+ - custom_module
17
+ match:
18
+ static_call: Drupal\block_content\Entity\BlockContentType::create
19
+ argument: 0
20
+ id: &id001
21
+ from:
22
+ argument_key: id
23
+ must_be: string_literal
24
+ template: block_content.type.{id}
25
+ on_miss: unresolved
26
+ emits:
27
+ - node:
28
+ type: drupal.block_type
29
+ confidence: declared
30
+ - rule: block_type_from_code_edges
31
+ reads: file
32
+ in:
33
+ - custom_module
34
+ match:
35
+ static_call: Drupal\block_content\Entity\BlockContentType::create
36
+ argument: 0
37
+ emits:
38
+ - edge:
39
+ kind: declares
40
+ from: enclosing_callable
41
+ to: this_node
42
+ confidence: declared
43
+ id: *id001
@@ -0,0 +1,45 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — block type declared by a config file. One rule.
4
+ #
5
+ # Covers two of the three ways at once, because both produce a file with the same name:
6
+ # a module shipping it block_type_ways/config/install/block_content.type.type_way_install.yml
7
+ # a recipe recipes/type_way_recipe/
8
+ # and the export carries all of them, whatever route made them.
9
+
10
+ needs:
11
+ types: [drupal.block_type]
12
+
13
+ rules:
14
+
15
+ - rule: block_type_from_config
16
+ reads: file
17
+ in: [config, module_config]
18
+ match:
19
+ file: "block_content.type.*"
20
+ filetype: yaml
21
+ id:
22
+ from: file_stem
23
+ emits:
24
+ - node: {type: drupal.block_type}
25
+ - attribute: {name: label, from: {key: label}}
26
+ confidence: declared
27
+ # Verified against three types made three different ways, all reaching one shape:
28
+ # config/default/block_content.type.type_way_install.yml
29
+ # config/default/block_content.type.type_way_code.yml
30
+ # config/default/block_content.type.type_way_recipe.yml
31
+ #
32
+ # The id is the whole file name, prefix included: block_content.type.type_way_code.
33
+ # Stripping the prefix was the first attempt and it is wrong, which only showed up when
34
+ # the second rule was written. References arrive in two shapes:
35
+ # field.field.block_content.type_way_code.body.yml:6 block_content.type.type_way_code
36
+ # field.field.block_content.type_way_code.body.yml:13 bundle: type_way_code
37
+ # The long form is what a dependency list writes, so the long form is the id, and the
38
+ # short one is composed up to it by whichever rule reads a bundle key.
39
+ #
40
+ # The id comes from the file name, not from the file's own `id:` key. That looks like a
41
+ # free choice and is not. Two files in one module carry the same `id:` value:
42
+ # core.entity_form_display.block_content.block_ways_note.default.yml:9
43
+ # core.entity_view_display.block_content.block_ways_note.default.yml:9
44
+ # Both say id: block_content.block_ways_note.default. Minting from that key merges a
45
+ # form display with a view display. The file name is what is actually unique.
@@ -0,0 +1,18 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — declares the cache backend type and the role that goes with it.
4
+ #
5
+ # The pair that forced the split between a type, of which a node has one, and a role, of
6
+ # which it may have many. trash/src/Cache/TrashEntityCacheBackend.php:14 implements both
7
+ # CacheBackendInterface and CacheTagsInvalidatorInterface. That is not ambiguity. It is one
8
+ # cache backend that also invalidates tags, and which interface classifies is the author's
9
+ # call because only the author knows.
10
+
11
+ node_types:
12
+
13
+ - name: drupal.cache_backend
14
+ parent: php.class
15
+
16
+ roles:
17
+
18
+ - name: drupal.invalidates_cache_tags
@@ -0,0 +1,31 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — classifies a cache backend and its role. Two rules, both reading the map.
4
+
5
+ needs:
6
+ types: [drupal.cache_backend]
7
+ roles: [drupal.invalidates_cache_tags]
8
+
9
+ rules:
10
+
11
+ - rule: cache_backend_class
12
+ reads: map
13
+ match:
14
+ node_type: php.class
15
+ where:
16
+ - ancestor_reaches: "Drupal\\Core\\Cache\\CacheBackendInterface"
17
+ emits:
18
+ - type: drupal.cache_backend
19
+ confidence: declared
20
+
21
+ - rule: invalidates_cache_tags
22
+ reads: map
23
+ match:
24
+ node_type: php.class
25
+ where:
26
+ - ancestor_reaches: "Drupal\\Core\\Cache\\CacheTagsInvalidatorInterface"
27
+ emits:
28
+ - role: drupal.invalidates_cache_tags
29
+ confidence: declared
30
+ # A role accumulates and never collides. A second matching TYPE would be a real
31
+ # collision and the build refuses; a second role is just a second capability.
@@ -0,0 +1,19 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — declares the Single Directory Component and the edge that renders one.
4
+
5
+ node_types:
6
+
7
+ - name: drupal.sdc_component
8
+ id_namespace: drupal.sdc
9
+
10
+ edge_kinds:
11
+
12
+ - kind: renders_component
13
+ from: php.callable
14
+ to: drupal.sdc_component
15
+
16
+ # The template itself is not in the map, and that is a gap rather than a decision.
17
+ # components/way_card/way_card.twig is where the component's behaviour lives. No pack claims
18
+ # .twig, so it is never opened. A twig pack fixes it the way the yaml pack fixed
19
+ # configuration — by being a pack, not by this one growing a second grammar.
@@ -0,0 +1,25 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — the component, from its definition file. One rule.
4
+
5
+ needs:
6
+ types: [drupal.sdc_component]
7
+
8
+ rules:
9
+
10
+ - rule: sdc_from_component_file
11
+ reads: file
12
+ in: [custom_module, custom_theme]
13
+ match:
14
+ file: "components/*/*.component"
15
+ filetype: yaml
16
+ id:
17
+ from: [enclosing_module, parent_directory]
18
+ template: "{enclosing_module}:{parent_directory}"
19
+ emits:
20
+ - node: {type: drupal.sdc_component}
21
+ - attribute: {name: props, from: {key: props.properties, keys: true}}
22
+ confidence: declared
23
+ # The id is composed from two things outside the file: the module that ships it and the
24
+ # directory it sits in. The file never states its own name. Same shape as a Next.js
25
+ # route, where the path is the identity and nothing inside the file says so.
@@ -0,0 +1,25 @@
1
+ $schema: "https://periplus.dev/schema/0/pack-file.schema.json"
2
+
3
+ # drupal pack — code rendering a component. One rule.
4
+
5
+ needs:
6
+ types: [drupal.sdc_component]
7
+
8
+ rules:
9
+
10
+ - rule: component_from_render_array
11
+ reads: file
12
+ in: [custom_module, custom_theme]
13
+ match:
14
+ array_entry: "#component"
15
+ id:
16
+ from: array_value
17
+ must_be: string_literal
18
+ on_miss: unresolved
19
+ emits:
20
+ - edge: {kind: renders_component, from: enclosing_callable, to: this_node}
21
+ confidence: declared
22
+ # WayCardTrait.php:31-38 returns '#type' => 'component', '#component' => 'block_ways:way_card'.
23
+ # A literal at the reference site meeting a composed id at the declaration site. This is
24
+ # the edge joining the PHP half of a module to its template half, and no tool that maps
25
+ # only source files produces it.