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.
- periplus/__init__.py +70 -0
- periplus/checkmap.py +80 -0
- periplus/cli.py +658 -0
- periplus/contract/schema/map.schema.json +138 -0
- periplus/contract/schema/navigation.schema.json +200 -0
- periplus/contract/schema/pack-file.schema.json +1405 -0
- periplus/contract/schema/pack-manifest.schema.json +245 -0
- periplus/contract/schema/project-settings.schema.json +85 -0
- periplus/contract/spec/engine.md +151 -0
- periplus/contract/spec/rules.md +352 -0
- periplus/detect.py +228 -0
- periplus/engine/__init__.py +5 -0
- periplus/engine/check.py +481 -0
- periplus/engine/emit.py +368 -0
- periplus/engine/packload.py +2321 -0
- periplus/engine/pattern.py +27 -0
- periplus/engine/rules.py +1946 -0
- periplus/engine/select.py +491 -0
- periplus/engine/source.py +172 -0
- periplus/engine/tree.py +424 -0
- periplus/errors.py +332 -0
- periplus/init.py +358 -0
- periplus/layout.py +28 -0
- periplus/manifest.py +498 -0
- periplus/map.py +364 -0
- periplus/navigate/__init__.py +1 -0
- periplus/navigate/find.py +143 -0
- periplus/navigate/ids.py +30 -0
- periplus/navigate/listing.py +42 -0
- periplus/navigate/mapfile.py +189 -0
- periplus/navigate/path.py +175 -0
- periplus/navigate/show.py +175 -0
- periplus/navigate/types.py +83 -0
- periplus/navigate/walk.py +138 -0
- periplus/packs/advancedqueue_basic@0.0.1/pack.yaml +14 -0
- periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type.yaml +9 -0
- periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type_annotation.yaml +43 -0
- periplus/packs/advancedqueue_basic@0.0.1/queue_job_type/queue_job_type_attribute.yaml +43 -0
- periplus/packs/ai_basic@0.0.1/ai_agent/ai_agent.yaml +8 -0
- periplus/packs/ai_basic@0.0.1/ai_agent/ai_agent_attribute.yaml +43 -0
- periplus/packs/ai_basic@0.0.1/ai_function_call/ai_function_call.yaml +8 -0
- periplus/packs/ai_basic@0.0.1/ai_function_call/ai_function_call_attribute.yaml +43 -0
- periplus/packs/ai_basic@0.0.1/pack.yaml +15 -0
- periplus/packs/config_pages_basic@0.0.1/bundle/config_pages_bundle_config.yaml +54 -0
- periplus/packs/config_pages_basic@0.0.1/pack.yaml +11 -0
- periplus/packs/crop_basic@0.0.1/bundle/crop_bundle_config.yaml +54 -0
- periplus/packs/crop_basic@0.0.1/pack.yaml +11 -0
- periplus/packs/drupal@0.1.0/block/block_placement.yaml +25 -0
- periplus/packs/drupal@0.1.0/block/block_placement_code.yaml +58 -0
- periplus/packs/drupal@0.1.0/block/block_placement_config.yaml +53 -0
- periplus/packs/drupal@0.1.0/block/block_plugin.yaml +52 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_altered.yaml +61 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_annotation.yaml +69 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_attribute.yaml +56 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_content.yaml +46 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_derived.yaml +110 -0
- periplus/packs/drupal@0.1.0/block/block_plugin_deriver.yaml +30 -0
- periplus/packs/drupal@0.1.0/block/block_type.yaml +14 -0
- periplus/packs/drupal@0.1.0/block/block_type_code.yaml +43 -0
- periplus/packs/drupal@0.1.0/block/block_type_config.yaml +45 -0
- periplus/packs/drupal@0.1.0/cache/cache.yaml +18 -0
- periplus/packs/drupal@0.1.0/cache/cache_backend.yaml +31 -0
- periplus/packs/drupal@0.1.0/component/sdc.yaml +19 -0
- periplus/packs/drupal@0.1.0/component/sdc_definition.yaml +25 -0
- periplus/packs/drupal@0.1.0/component/sdc_use.yaml +25 -0
- periplus/packs/drupal@0.1.0/config/config_object.yaml +65 -0
- periplus/packs/drupal@0.1.0/display/display.yaml +32 -0
- periplus/packs/drupal@0.1.0/display/display_code.yaml +53 -0
- periplus/packs/drupal@0.1.0/display/display_config.yaml +95 -0
- periplus/packs/drupal@0.1.0/entity/entity.yaml +33 -0
- periplus/packs/drupal@0.1.0/entity/entity_class.yaml +60 -0
- periplus/packs/drupal@0.1.0/entity/entity_save.yaml +27 -0
- periplus/packs/drupal@0.1.0/entity/entity_type_annotation.yaml +85 -0
- periplus/packs/drupal@0.1.0/entity/entity_type_attribute.yaml +76 -0
- periplus/packs/drupal@0.1.0/field/field_instance_code.yaml +40 -0
- periplus/packs/drupal@0.1.0/field/field_instance_config.yaml +58 -0
- periplus/packs/drupal@0.1.0/field/field_storage.yaml +37 -0
- periplus/packs/drupal@0.1.0/field/field_storage_code.yaml +39 -0
- periplus/packs/drupal@0.1.0/field/field_storage_config.yaml +24 -0
- periplus/packs/drupal@0.1.0/form/form.yaml +48 -0
- periplus/packs/drupal@0.1.0/form/form_class.yaml +50 -0
- periplus/packs/drupal@0.1.0/form/form_id.yaml +48 -0
- periplus/packs/drupal@0.1.0/form/form_methods.yaml +39 -0
- periplus/packs/drupal@0.1.0/hook/hook.yaml +8 -0
- periplus/packs/drupal@0.1.0/hook/hook_attribute.yaml +28 -0
- periplus/packs/drupal@0.1.0/module/module.yaml +8 -0
- periplus/packs/drupal@0.1.0/module/module_info.yaml +50 -0
- periplus/packs/drupal@0.1.0/pack.yaml +184 -0
- periplus/packs/drupal@0.1.0/plugin/plugin.yaml +17 -0
- periplus/packs/drupal@0.1.0/plugin/plugin_annotation.yaml +120 -0
- periplus/packs/drupal@0.1.0/recommendations/recommendations.yaml +14 -0
- periplus/packs/drupal@0.1.0/service/service.yaml +19 -0
- periplus/packs/drupal@0.1.0/service/service_autowire.yaml +28 -0
- periplus/packs/drupal@0.1.0/service/service_definition.yaml +24 -0
- periplus/packs/drupal@0.1.0/service/service_use.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/action/action.yaml +9 -0
- periplus/packs/drupal_basic@0.3.0/action/action_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/action/action_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/block/block_placement.yaml +16 -0
- periplus/packs/drupal_basic@0.3.0/block/block_placement_config.yaml +51 -0
- periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin.yaml +14 -0
- periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin_annotation.yaml +47 -0
- periplus/packs/drupal_basic@0.3.0/block_plugin/block_plugin_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/block_type/block_type.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/block_type/block_type_config.yaml +54 -0
- periplus/packs/drupal_basic@0.3.0/boundary/boundary_types.yaml +19 -0
- periplus/packs/drupal_basic@0.3.0/bundle/bundle.yaml +20 -0
- periplus/packs/drupal_basic@0.3.0/bundle/bundle_config.yaml +393 -0
- periplus/packs/drupal_basic@0.3.0/call/call.yaml +349 -0
- periplus/packs/drupal_basic@0.3.0/component/component.yaml +30 -0
- periplus/packs/drupal_basic@0.3.0/config/config_object.yaml +119 -0
- periplus/packs/drupal_basic@0.3.0/constraint/constraint.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/constraint/constraint_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/constraint/constraint_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/display/display.yaml +30 -0
- periplus/packs/drupal_basic@0.3.0/display/display_config.yaml +203 -0
- periplus/packs/drupal_basic@0.3.0/display/display_mode_config.yaml +60 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/config_entity_type_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/config_entity_type_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/content_entity_type_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/content_entity_type_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/entity_type/entity_type.yaml +16 -0
- periplus/packs/drupal_basic@0.3.0/field/field_instance_config.yaml +116 -0
- periplus/packs/drupal_basic@0.3.0/field/field_storage.yaml +21 -0
- periplus/packs/drupal_basic@0.3.0/field/field_storage_config.yaml +45 -0
- periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/field_formatter/field_formatter_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/field_type/field_type_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/field_type/field_type_attribute.yaml +50 -0
- periplus/packs/drupal_basic@0.3.0/field_widget/field_widget_annotation.yaml +46 -0
- periplus/packs/drupal_basic@0.3.0/field_widget/field_widget_attribute.yaml +50 -0
- periplus/packs/drupal_basic@0.3.0/form/form_id.yaml +80 -0
- periplus/packs/drupal_basic@0.3.0/hook/hook.yaml +100 -0
- periplus/packs/drupal_basic@0.3.0/hook/hook_attribute.yaml +64 -0
- periplus/packs/drupal_basic@0.3.0/hook/hook_theme_include.yaml +34 -0
- periplus/packs/drupal_basic@0.3.0/library/library.yaml +12 -0
- periplus/packs/drupal_basic@0.3.0/library/library_definition.yaml +58 -0
- periplus/packs/drupal_basic@0.3.0/local_action/local_action.yaml +12 -0
- periplus/packs/drupal_basic@0.3.0/local_action/local_action_definition.yaml +49 -0
- periplus/packs/drupal_basic@0.3.0/mail/mail.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/mail/mail_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/media_source/media_source.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/media_source/media_source_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/media_source/media_source_attribute.yaml +79 -0
- periplus/packs/drupal_basic@0.3.0/menu_link/menu_link.yaml +18 -0
- periplus/packs/drupal_basic@0.3.0/menu_link/menu_link_definition.yaml +48 -0
- periplus/packs/drupal_basic@0.3.0/module/module.yaml +7 -0
- periplus/packs/drupal_basic@0.3.0/module/module_info.yaml +58 -0
- periplus/packs/drupal_basic@0.3.0/pack.yaml +528 -0
- periplus/packs/drupal_basic@0.3.0/permission/permission.yaml +7 -0
- periplus/packs/drupal_basic@0.3.0/permission/permission_definition.yaml +27 -0
- periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker.yaml +9 -0
- periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/queue_worker/queue_worker_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource.yaml +8 -0
- periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource_annotation.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/rest_resource/rest_resource_attribute.yaml +43 -0
- periplus/packs/drupal_basic@0.3.0/role/role.yaml +14 -0
- periplus/packs/drupal_basic@0.3.0/role/role_config.yaml +44 -0
- periplus/packs/drupal_basic@0.3.0/route/route.yaml +42 -0
- periplus/packs/drupal_basic@0.3.0/route/route_definition.yaml +113 -0
- periplus/packs/drupal_basic@0.3.0/route/route_options.yaml +55 -0
- periplus/packs/drupal_basic@0.3.0/route/route_requirements.yaml +108 -0
- periplus/packs/drupal_basic@0.3.0/service/service.yaml +56 -0
- periplus/packs/drupal_basic@0.3.0/service/service_definition.yaml +181 -0
- periplus/packs/drupal_basic@0.3.0/template/template.yaml +86 -0
- periplus/packs/drupal_basic@0.3.0/template/template_route_link.yaml +30 -0
- periplus/packs/drupal_basic@0.3.0/theme/theme.yaml +15 -0
- periplus/packs/drupal_basic@0.3.0/theme/theme_info.yaml +61 -0
- periplus/packs/drupal_basic@0.3.0/theme_hook/template_suggestion.yaml +29 -0
- periplus/packs/drupal_basic@0.3.0/theme_hook/theme_hook.yaml +87 -0
- periplus/packs/drupal_basic@0.3.0/theme_hook/theme_hook_render.yaml +20 -0
- periplus/packs/drupal_basic@0.3.0/url/url.yaml +88 -0
- periplus/packs/drupal_basic@0.3.0/views_plugin/views_field_attribute.yaml +80 -0
- periplus/packs/drupal_basic@0.3.0/views_plugin/views_filter_attribute.yaml +80 -0
- periplus/packs/drupal_basic@0.3.0/views_plugin/views_plugin.yaml +15 -0
- periplus/packs/drupal_basic@0.3.0/views_plugin/views_style_attribute.yaml +80 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/attachment.yaml +12 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_php.yaml +15 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_php_array.yaml +52 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/attachment_in_twig.yaml +26 -0
- periplus/packs/drupal_js_basic@0.0.1/attachment/php_function_holder.yaml +13 -0
- periplus/packs/drupal_js_basic@0.0.1/behavior/behavior.yaml +198 -0
- periplus/packs/drupal_js_basic@0.0.1/pack.yaml +153 -0
- periplus/packs/drupal_js_basic@0.0.1/setting/setting.yaml +13 -0
- periplus/packs/drupal_js_basic@0.0.1/setting/setting_in_js.yaml +15 -0
- periplus/packs/drupal_js_basic@0.0.1/setting/setting_in_php.yaml +92 -0
- periplus/packs/drush_basic@0.0.1/command/command.yaml +15 -0
- periplus/packs/drush_basic@0.0.1/command/command_annotation.yaml +60 -0
- periplus/packs/drush_basic@0.0.1/command/command_attribute.yaml +88 -0
- periplus/packs/drush_basic@0.0.1/pack.yaml +29 -0
- periplus/packs/eck_basic@0.0.1/bundle/eck_bundle_config.yaml +56 -0
- periplus/packs/eck_basic@0.0.1/entity_type/eck_entity_type_config.yaml +26 -0
- periplus/packs/eck_basic@0.0.1/pack.yaml +28 -0
- periplus/packs/go@0.0.2/interfaces/satisfies.yaml +47 -0
- periplus/packs/go@0.0.2/pack.yaml +51 -0
- periplus/packs/go@0.0.2/types/find_declarations.yaml +137 -0
- periplus/packs/go@0.0.2/types/node_types.yaml +36 -0
- periplus/packs/go_basic@0.0.3/pack.yaml +104 -0
- periplus/packs/go_basic@0.0.3/rules/calls.yaml +25 -0
- periplus/packs/go_basic@0.0.3/rules/declarations.yaml +40 -0
- periplus/packs/go_basic@0.0.3/rules/imports.yaml +16 -0
- periplus/packs/go_basic@0.0.3/types/node_types.yaml +15 -0
- periplus/packs/js_basic@0.0.1/function/function.yaml +68 -0
- periplus/packs/js_basic@0.0.1/pack.yaml +50 -0
- periplus/packs/laravel_basic@0.0.5/pack.yaml +313 -0
- periplus/packs/laravel_basic@0.0.5/rules/classes.yaml +42 -0
- periplus/packs/laravel_basic@0.0.5/rules/config.yaml +229 -0
- periplus/packs/laravel_basic@0.0.5/rules/routes.yaml +210 -0
- periplus/packs/laravel_basic@0.0.5/rules/types.yaml +50 -0
- periplus/packs/laravel_basic@0.0.5/rules/views.yaml +100 -0
- periplus/packs/paragraphs_basic@0.0.1/bundle/paragraph_bundle_config.yaml +54 -0
- periplus/packs/paragraphs_basic@0.0.1/pack.yaml +12 -0
- periplus/packs/php@0.1.0/edges/edge_kinds.yaml +64 -0
- periplus/packs/php@0.1.0/edges/find_calls.yaml +34 -0
- periplus/packs/php@0.1.0/edges/find_imports.yaml +18 -0
- periplus/packs/php@0.1.0/edges/find_member_access.yaml +22 -0
- periplus/packs/php@0.1.0/edges/find_structure.yaml +38 -0
- periplus/packs/php@0.1.0/embedded/embedded_regions.yaml +19 -0
- periplus/packs/php@0.1.0/imports/imports.yaml +20 -0
- periplus/packs/php@0.1.0/pack.yaml +117 -0
- periplus/packs/php@0.1.0/resolution/excluded_tokens.yaml +23 -0
- periplus/packs/php@0.1.0/resolution/resolution.yaml +35 -0
- periplus/packs/php@0.1.0/types/find_declarations.yaml +102 -0
- periplus/packs/php@0.1.0/types/node_types.yaml +55 -0
- periplus/packs/php_basic@0.2.0/edges/edge_kinds.yaml +48 -0
- periplus/packs/php_basic@0.2.0/edges/find_structure.yaml +750 -0
- periplus/packs/php_basic@0.2.0/imports/imports.yaml +19 -0
- periplus/packs/php_basic@0.2.0/pack.yaml +94 -0
- periplus/packs/php_basic@0.2.0/types/find_declarations.yaml +267 -0
- periplus/packs/php_basic@0.2.0/types/node_types.yaml +55 -0
- periplus/packs/profile_basic@0.0.1/bundle/profile_bundle_config.yaml +54 -0
- periplus/packs/profile_basic@0.0.1/pack.yaml +12 -0
- periplus/packs/salesforce_basic@0.0.1/event/salesforce_event.yaml +36 -0
- periplus/packs/salesforce_basic@0.0.1/pack.yaml +31 -0
- periplus/packs/salesforce_basic@0.0.1/salesforce_mapping/salesforce_mapping.yaml +19 -0
- periplus/packs/salesforce_basic@0.0.1/salesforce_mapping/salesforce_mapping_config.yaml +83 -0
- periplus/packs/salesforce_basic@0.0.1/salesforce_mapping_field/salesforce_mapping_field.yaml +8 -0
- periplus/packs/salesforce_basic@0.0.1/salesforce_mapping_field/salesforce_mapping_field_annotation.yaml +43 -0
- periplus/packs/twig@0.0.1/pack.yaml +26 -0
- periplus/packs/twig@0.0.1/types/template.yaml +57 -0
- periplus/packs/twig_basic@0.1.0/pack.yaml +11 -0
- periplus/packs/twig_tweak_basic@0.0.1/pack.yaml +27 -0
- periplus/packs/twig_tweak_basic@0.0.1/rules/block.yaml +20 -0
- periplus/packs/twig_tweak_basic@0.0.1/rules/entity.yaml +35 -0
- periplus/packs/twig_tweak_basic@0.0.1/rules/field.yaml +21 -0
- periplus/packs/twig_tweak_basic@0.0.1/rules/menu.yaml +21 -0
- periplus/packs/webform_basic@0.0.1/bundle/webform_submission_bundle_config.yaml +54 -0
- periplus/packs/webform_basic@0.0.1/pack.yaml +20 -0
- periplus/packs/webform_basic@0.0.1/webform_handler/webform_handler.yaml +8 -0
- periplus/packs/webform_basic@0.0.1/webform_handler/webform_handler_annotation.yaml +43 -0
- periplus/packs/yaml@0.0.1/pack.yaml +72 -0
- periplus/packs/yaml@0.0.1/types/find_mapping_entry.yaml +21 -0
- periplus/packs/yaml@0.0.1/types/yaml_types.yaml +44 -0
- periplus/packs/yaml_basic@0.1.0/pack.yaml +10 -0
- periplus/packs.py +447 -0
- periplus/preflight.py +102 -0
- periplus/py.typed +0 -0
- periplus/report.py +596 -0
- periplus/resolution.py +355 -0
- periplus/settings.py +617 -0
- periplus/settings.stub.yml +99 -0
- periplus/spec.py +774 -0
- periplus/update.py +197 -0
- periplus/validate.py +655 -0
- periplus_map-0.2.1.dist-info/METADATA +566 -0
- periplus_map-0.2.1.dist-info/RECORD +272 -0
- periplus_map-0.2.1.dist-info/WHEEL +4 -0
- periplus_map-0.2.1.dist-info/entry_points.txt +2 -0
- periplus_map-0.2.1.dist-info/licenses/LICENSE +202 -0
- 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.
|