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,528 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-manifest.schema.json"
|
|
2
|
+
|
|
3
|
+
# The walking-skeleton Drupal pack: every exported or installed configuration file becomes one
|
|
4
|
+
# node. It is renamed to drupal when the reference packs retire.
|
|
5
|
+
#
|
|
6
|
+
# Known gaps. The basic Drupal pack maps, beside php_basic's classes, functions and methods:
|
|
7
|
+
# - configuration, modules, themes, services with their tags and classes, routes, permissions,
|
|
8
|
+
# libraries, templates, entity types, bundles, fields, displays, menu links, local actions,
|
|
9
|
+
# block placements and the plugin kinds whose folders are named under folders below. A service's
|
|
10
|
+
# class may be a class or an interface, as for a service a factory builds;
|
|
11
|
+
# - each bundle under the id <entity type>.<bundle>, as node.article. A bundle config file of a core
|
|
12
|
+
# prefix declares it with its label, a configured_by edge to that file and a bundle_of edge to
|
|
13
|
+
# its entity type. A field instance or a display gives a field_of or displays edge to the bundle
|
|
14
|
+
# its entity type and bundle keys name, and an inferred bundle_of edge from that bundle. A bundle
|
|
15
|
+
# or an entity type that no rule declares, such as a paragraph type or the ECK entity type
|
|
16
|
+
# my_type, ends at a referenced node. A field storage gives a storage_of edge to its entity
|
|
17
|
+
# type, a view or form mode a mode_of edge to its entity type, and a display in a mode other than
|
|
18
|
+
# default an in_mode edge to that mode;
|
|
19
|
+
# - each service that \Drupal::service('x') names in a PHP function or method, as a uses_service
|
|
20
|
+
# edge; each service that get('x') or ?->get('x') names on an object written $container,
|
|
21
|
+
# $this->container, \Drupal::getContainer(), or getContainer() on $this, static or self, as a
|
|
22
|
+
# uses_service edge with confidence inferred; and each entity type
|
|
23
|
+
# that \Drupal::entityQuery('x') or \Drupal::entityQueryAggregate('x') names, or that
|
|
24
|
+
# getStorage('x'), getViewBuilder('x'), getListBuilder('x'), getFormObject('x') or
|
|
25
|
+
# getAccessControlHandler('x') names on an object written ending in entityTypeManager, written
|
|
26
|
+
# $entity_type_manager, written as the container's get('entity_type.manager') or
|
|
27
|
+
# \Drupal::service('entity_type.manager'), or reached through a property of $this whose declared
|
|
28
|
+
# type is EntityTypeManager or EntityTypeManagerInterface, as a uses_entity_type edge. A service
|
|
29
|
+
# or an entity type that no mapped file declares, such as config.factory or node, ends at a
|
|
30
|
+
# referenced node: Drupal core and contributed modules are outside the mapped code;
|
|
31
|
+
# - each method that carries a Hook attribute, and each function in a module, install, inc, theme,
|
|
32
|
+
# profile, post_update.php or deploy.php file whose name starts with the first part of the file
|
|
33
|
+
# name and an underscore, as an implements_hook edge to the hook the rest of the name gives:
|
|
34
|
+
# mymod_cron in mymod.module implements cron, mymod_post_update_fix in mymod.post_update.php
|
|
35
|
+
# implements post_update_NAME, as every update_N function implements the one hook update_N. A
|
|
36
|
+
# function in an inc file, or a theme file other than the theme's own, below a custom theme
|
|
37
|
+
# folder, whose name starts with that folder's name and an underscore, implements a hook the
|
|
38
|
+
# same way: mytheme_preprocess_node in mytheme/preprocess/node.preprocess.inc or in
|
|
39
|
+
# mytheme/includes/content.theme implements preprocess_node. A hook found by a
|
|
40
|
+
# function's name has confidence inferred;
|
|
41
|
+
# - a route's methods, its requirements _access, _format, _user_is_logged_in, _csrf_token,
|
|
42
|
+
# _entity_access and _custom_access, and its options no_cache and _admin_route, as attributes
|
|
43
|
+
# holding the value as written; each role its _role names, as a requires_role or accepts_role
|
|
44
|
+
# edge to user.role.<role>; a _custom_access written service:method as an
|
|
45
|
+
# access_checked_by_service edge, one written Class::method as an access_checked_by edge; a
|
|
46
|
+
# _title_callback written Class::method as a titled_by edge; and each parameter typed
|
|
47
|
+
# entity:<type> as a loads_entity_type edge;
|
|
48
|
+
# - each role's configuration as a role, with its is_admin attribute, and each permission it lists
|
|
49
|
+
# as a grants_permission edge. A role or permission that no mapped file declares, such as one
|
|
50
|
+
# from core or a contributed module, ends at a referenced node.;
|
|
51
|
+
# - each route a template names in path('x') or url('x'), as a template_links_route edge, read as
|
|
52
|
+
# text; a core route such as user.login ends at a referenced node;
|
|
53
|
+
# - each template another template names in an include, extends, embed, import or from, as a
|
|
54
|
+
# template_includes edge, and each component an include or embed names as theme:name, as a
|
|
55
|
+
# template_includes_component edge to the component's name. Read as text; a name no mapped
|
|
56
|
+
# template or component has ends at a referenced node;
|
|
57
|
+
# - each theme hook that a hook_theme function declares, as a drupal.theme_hook node, and the
|
|
58
|
+
# class or trait under src that gives '#theme' => 'name' in a render array, as a
|
|
59
|
+
# renders_theme_hook edge to it. A hook links to its template by theme_hook_template: the
|
|
60
|
+
# template key as declared, and
|
|
61
|
+
# for a hook with no template and no function key its name with underscores written as dashes,
|
|
62
|
+
# as inferred. A template named <entity>--<bundle>--<view mode> of node, taxonomy-term,
|
|
63
|
+
# block-content, paragraph, media or comment gives a suggests_bundle edge to the bundle
|
|
64
|
+
# <entity>.<bundle>, as inferred.
|
|
65
|
+
# - each simple configuration file, with no top-level uuid, as a config_provided_by edge to the
|
|
66
|
+
# module its name starts with; each literal form id a form class returns, as a drupal.form_id
|
|
67
|
+
# node with a form_has_id edge from the class, and each form id a CAPTCHA point or the honeypot
|
|
68
|
+
# settings name, as a config_names_form edge; each hook named <extension>_<type>_<operation>,
|
|
69
|
+
# as an inferred hook_acts_on_entity_type edge to <type>; each route's path, as a
|
|
70
|
+
# route_serves_path edge to a drupal.url_path node, and each path Url::fromUserInput or
|
|
71
|
+
# Url::fromUri('internal:...') names, as a links_to_path edge. The rule files' headers name
|
|
72
|
+
# their limits.
|
|
73
|
+
#
|
|
74
|
+
# False results:
|
|
75
|
+
# - A suggests_bundle edge is made whether or not the bundle is mapped: the engine cannot ask. An
|
|
76
|
+
# unmapped bundle ends at a referenced node.
|
|
77
|
+
# - A hook with a template key kept in a variables default, or an entry whose first key is not a
|
|
78
|
+
# registry key, reads as no hook or as the wrong one. A hook entry that opens with the key
|
|
79
|
+
# type, pattern or function is not found. One that opens with path or file is found when a
|
|
80
|
+
# registry key follows at its own bracket level, so a variable default such as
|
|
81
|
+
# 'link' => ['path' => NULL] does not read as a hook. Inside a hook_theme function, any key
|
|
82
|
+
# whose array opens with a registry key reads as a hook: 'nested' => ['variables' => NULL]
|
|
83
|
+
# inside an entry gives the hook nested.
|
|
84
|
+
# - A function name of the form <extension>_<type>_<operation> gives a hook_acts_on_entity_type
|
|
85
|
+
# edge whether or not <type> is an entity type. On Drupal core, helpers read as the hooks
|
|
86
|
+
# cookie_delete, mass_update, set_edit_access and translate_access end at the referenced entity
|
|
87
|
+
# types cookie, mass, set_edit and translate.
|
|
88
|
+
# - Any function whose name starts with the first part of the file name reads as a hook: the form
|
|
89
|
+
# callback mymod_settings_submit reads as the hook settings_submit, the helper mymod_build_list
|
|
90
|
+
# as build_list, and mymod_update_NEXT as update_NEXT. The same holds for a theme's inc file
|
|
91
|
+
# and the theme folder's name. On one site, 8 of 165 hooks were such callbacks or helpers.
|
|
92
|
+
# - The prefix is the file name, not an installed module's name. If Drupal core were inside the
|
|
93
|
+
# mapped folders, its files such as form.inc would give false hooks, such as select_options from
|
|
94
|
+
# form_select_options.
|
|
95
|
+
# - A procedural function kept beside a Hook attribute method for the same hook, a LegacyHook shim,
|
|
96
|
+
# reads as a second implementation of that hook, though Drupal skips the shim.
|
|
97
|
+
# - A function below one that carries the ProceduralHookScanStop attribute, and every function of
|
|
98
|
+
# a module that sets skip_procedural_hook_scan, still reads as a hook, though Drupal does not
|
|
99
|
+
# scan them.
|
|
100
|
+
# - A misspelled service or entity type name ends at a referenced node, as a real one from core
|
|
101
|
+
# does, and not at an unresolved one.
|
|
102
|
+
# - A $container or $this->container that is not Drupal's service container gives a false
|
|
103
|
+
# service.
|
|
104
|
+
#
|
|
105
|
+
# Missing results:
|
|
106
|
+
# - A '#theme' written in a function, such as a hook in a module file, gives no edge, because the
|
|
107
|
+
# rule starts it at the class the file path names. A theme hook declared by a method of a class,
|
|
108
|
+
# or by a hook_theme function that is not named theme or ending in _theme, is not found. A
|
|
109
|
+
# template named <entity>--<name>.html.twig gives no suggests_bundle edge, because the file
|
|
110
|
+
# cannot tell a bundle from a view mode or a node id.
|
|
111
|
+
# - A form id is read only from a getFormId() whose body returns a literal text, which gives a
|
|
112
|
+
# drupal.form_id node and a form_has_id edge. A constant, a concatenation or a variable returned
|
|
113
|
+
# gives neither.
|
|
114
|
+
# - A template is known by its file stem, and a component by its name without the theme: two
|
|
115
|
+
# themes that define a component of one name meet at one node, as templates of one name do.
|
|
116
|
+
# A template or component named by a variable, a concatenation or a list gives no edge. Only
|
|
117
|
+
# a name ending in .html.twig gives a template edge, and only a .html.twig file is read, so
|
|
118
|
+
# a component's own .twig and story files give none.
|
|
119
|
+
# - A function in a module file named other than its module, such as includes/helpers.inc
|
|
120
|
+
# holding mymod_ functions, gives no hook. A theme's inc file, and a theme file named other than
|
|
121
|
+
# its theme, such as includes/content.theme, is read by the name of the folder directly below
|
|
122
|
+
# custom_theme, so a theme nested deeper, or one whose folder name is not its machine name,
|
|
123
|
+
# gives no hook. Nor does a function named with another module's name, such as
|
|
124
|
+
# othermod_cron in mymod.module, which Drupal counts as a hook of othermod.
|
|
125
|
+
# - The number of an update_N function is not recorded apart from the function's name.
|
|
126
|
+
# - Plugins of the core types not named under folders below give nothing, such as a views
|
|
127
|
+
# argument, sort or display plugin. A views field, filter or style plugin declared by an
|
|
128
|
+
# annotation, and a mail plugin declared by an annotation, give nothing. A views plugin gives
|
|
129
|
+
# one skipped row, argument 0 or id missing, from the rule that reads the other form of the id.
|
|
130
|
+
# - A plugin type itself, its attribute class and its plugin manager service, gets no node.
|
|
131
|
+
# - A hook with a variable part keeps that part in its name: mymod_form_user_login_form_alter
|
|
132
|
+
# implements form_user_login_form_alter, not form_FORM_ID_alter.
|
|
133
|
+
# - A class that extends ContentEntityBase and carries no ContentEntityType attribute or
|
|
134
|
+
# annotation, such as an abstract base or a bundle class, reads as a descendant of the boundary
|
|
135
|
+
# name ContentEntityBase, and is still not marked as an entity class.
|
|
136
|
+
# - A service or entity type named by a variable, a concatenation, or a class constant that no
|
|
137
|
+
# mapped file declares as text, gives no edge and goes under skipped. So does parent::X, even
|
|
138
|
+
# when a mapped file declares it: only self and static read as the enclosing class.
|
|
139
|
+
# getStorage('x') on an object with another name, as $etm, get('x') on a container with another
|
|
140
|
+
# name, a receiver
|
|
141
|
+
# written with a space or a line break inside get('entity_type.manager'), and other entity type
|
|
142
|
+
# manager methods such as getHandler('x') give no edge.
|
|
143
|
+
# - A \Drupal:: shortcut gives a uses_service edge only when the table shortcut_services below
|
|
144
|
+
# lists its method, and \Drupal::cache('x') gives none. A static load, loadMultiple or create
|
|
145
|
+
# call gives a uses_entity_type edge only on a core entity class the table entity_classes lists:
|
|
146
|
+
# MyEntity::loadMultiple() and Message::load(1) give none. Each such call is listed as skipped.
|
|
147
|
+
# An entity class is known by its short name, so a project class named as a core one, such as
|
|
148
|
+
# a module's own User class, gives a false uses_entity_type edge.
|
|
149
|
+
# - The container rules read get('x') in lower case only: another letter case, such as
|
|
150
|
+
# ->GET('x'), gives no edge and no skipped row.
|
|
151
|
+
# - A contributed module's bundle config file, such as paragraphs.paragraphs_type.text or
|
|
152
|
+
# eck.eck_type.my_type.my_bundle, stays a plain config object. Its bundle is
|
|
153
|
+
# referenced, with no label and no configured_by edge, and a type that no field or display names
|
|
154
|
+
# has no bundle node. That module's own rutter maps the file onto the same bundle id.
|
|
155
|
+
# - A display in the mode default has no in_mode edge, because that mode has no config file.
|
|
156
|
+
# - An entity reference field's target bundles, under settings.handler_settings.target_bundles,
|
|
157
|
+
# give no edge.
|
|
158
|
+
# - A top-level function in a plain .php file in the custom folders, other than a post_update.php
|
|
159
|
+
# or deploy.php file, makes no hook. Each such file leaves two skipped rows in the report, one
|
|
160
|
+
# per hook rule, at its first function.
|
|
161
|
+
# - A _custom_access written service:method gives an edge to the service only. The method stays in
|
|
162
|
+
# the custom_access attribute and gives no edge to a PHP method.
|
|
163
|
+
# - The applies_to key of a service's access_check tag is kept as the service's applies_to
|
|
164
|
+
# attribute, not on the tagged_as edge, because an attribute on an edge is accepted and not
|
|
165
|
+
# executed. A custom route requirement that such a tag binds, such as _mymod_access: 'TRUE', is
|
|
166
|
+
# not read and gives no edge to the service.
|
|
167
|
+
# - A route parameter that Drupal converts to an entity because its name is an entity type, with
|
|
168
|
+
# no options.parameters type, gives no loads_entity_type edge, nor does a type other than
|
|
169
|
+
# entity:<type>, such as entity_revision:<type>.
|
|
170
|
+
# - Requirements and options other than those listed above give nothing: _entity_create_access,
|
|
171
|
+
# _module_dependencies, a parameter's pattern, _auth, _maintenance_access, a custom option, and
|
|
172
|
+
# the like.
|
|
173
|
+
# - An attribute keeps the value as written, so no_cache: 'TRUE' and no_cache: true give "TRUE"
|
|
174
|
+
# and true, and is_admin: null gives null.
|
|
175
|
+
#
|
|
176
|
+
# Settings to know:
|
|
177
|
+
# - Only the custom modules and themes are read as PHP. Move them with custom_module and
|
|
178
|
+
# custom_theme under folders. A folder setting may not leave the project root, so a site is
|
|
179
|
+
# mapped from inside its own tree or from a copy.
|
|
180
|
+
# - This pack repeats php_basic's PHP grammar pin, because a pack that reads a file type as a tree
|
|
181
|
+
# must pin the grammar itself. A grammar update must change both packs.
|
|
182
|
+
pack: drupal_basic
|
|
183
|
+
version: 0.3.0
|
|
184
|
+
depends: [yaml_basic, php_basic, twig_basic]
|
|
185
|
+
|
|
186
|
+
# ======================================================================================
|
|
187
|
+
# DETECTION
|
|
188
|
+
#
|
|
189
|
+
# What makes a checkout a Drupal checkout, so `periplus init` can prefill this pin. The
|
|
190
|
+
# answer is written here rather than in the engine: recognising a stack is pack data, and
|
|
191
|
+
# a pack somebody else wrote is detected exactly the way this one is.
|
|
192
|
+
#
|
|
193
|
+
# Neither signal is "there is PHP here". php_basic, yaml_basic and twig_basic are reached
|
|
194
|
+
# through `depends` and declare no detector of their own, because a repository having PHP
|
|
195
|
+
# in it is not a stack anybody pins.
|
|
196
|
+
#
|
|
197
|
+
# What init writes is a suggestion in a file the person then edits. A missed detection
|
|
198
|
+
# costs them one typed line; a spurious one costs a wrong pin in a committed artifact. So
|
|
199
|
+
# both signals below are things only a Drupal repository has.
|
|
200
|
+
# ======================================================================================
|
|
201
|
+
detect:
|
|
202
|
+
any_of:
|
|
203
|
+
# The dependency, which is the claim the repository makes about itself. `drupal/core`
|
|
204
|
+
# rather than `drupal/core-recommended`: the substring covers core, core-recommended
|
|
205
|
+
# and core-composer-scaffold, and every Drupal site requires at least one of them.
|
|
206
|
+
# Verified against drupal-cms/composer.json on 2026-08-28, which requires
|
|
207
|
+
# drupal/core-composer-scaffold, drupal/core-project-message and
|
|
208
|
+
# drupal/core-recommended.
|
|
209
|
+
- path: composer.json
|
|
210
|
+
contains: "drupal/core"
|
|
211
|
+
|
|
212
|
+
# The docroot, for a checkout that has core in the tree and no composer.json at the
|
|
213
|
+
# root -- core's own repository, and a site vendored without Composer. The filename
|
|
214
|
+
# alone is the evidence, so this signal needs no `contains`.
|
|
215
|
+
- path: web/core/lib/Drupal.php
|
|
216
|
+
|
|
217
|
+
folders:
|
|
218
|
+
config: ./config/sync
|
|
219
|
+
custom_module: ./web/modules/custom
|
|
220
|
+
custom_theme: ./web/themes/custom
|
|
221
|
+
# An extension's shipped configuration: config/install and config/optional.
|
|
222
|
+
module_config:
|
|
223
|
+
- "{custom_module}/**/config/install"
|
|
224
|
+
- "{custom_module}/**/config/optional"
|
|
225
|
+
- "{custom_theme}/**/config/install"
|
|
226
|
+
- "{custom_theme}/**/config/optional"
|
|
227
|
+
module_root: "{custom_module}/**"
|
|
228
|
+
theme_root: "{custom_theme}/**"
|
|
229
|
+
# php_basic's source, narrowed to the custom modules and themes at any depth.
|
|
230
|
+
source:
|
|
231
|
+
- "{custom_module}/**"
|
|
232
|
+
- "{custom_theme}/**"
|
|
233
|
+
# The folder a plugin kind is discovered in: the sub-folder its manager names, below a module's
|
|
234
|
+
# src folder, and every folder below it. A class elsewhere is not discovered. An entity type is
|
|
235
|
+
# discovered in src/Entity.
|
|
236
|
+
action_classes: "{module_root}/src/Plugin/Action/**"
|
|
237
|
+
block_plugin_classes: "{module_root}/src/Plugin/Block/**"
|
|
238
|
+
constraint_classes: "{module_root}/src/Plugin/Validation/Constraint/**"
|
|
239
|
+
entity_type_classes: "{module_root}/src/Entity/**"
|
|
240
|
+
field_formatter_classes: "{module_root}/src/Plugin/Field/FieldFormatter/**"
|
|
241
|
+
field_type_classes: "{module_root}/src/Plugin/Field/FieldType/**"
|
|
242
|
+
field_widget_classes: "{module_root}/src/Plugin/Field/FieldWidget/**"
|
|
243
|
+
mail_classes: "{module_root}/src/Plugin/Mail/**"
|
|
244
|
+
media_source_classes: "{module_root}/src/Plugin/media/Source/**"
|
|
245
|
+
queue_worker_classes: "{module_root}/src/Plugin/QueueWorker/**"
|
|
246
|
+
rest_resource_classes: "{module_root}/src/Plugin/rest/resource/**"
|
|
247
|
+
views_field_classes: "{module_root}/src/Plugin/views/field/**"
|
|
248
|
+
views_filter_classes: "{module_root}/src/Plugin/views/filter/**"
|
|
249
|
+
views_style_classes: "{module_root}/src/Plugin/views/style/**"
|
|
250
|
+
|
|
251
|
+
files:
|
|
252
|
+
# The Drupal endings that hold PHP, added to php_basic's list.
|
|
253
|
+
extends: php_basic
|
|
254
|
+
add_extensions: [module, install, inc, theme, profile, engine]
|
|
255
|
+
# The Group module's group.permissions files hold Group permissions, not Drupal permissions, and
|
|
256
|
+
# their stem also ends in .permissions.
|
|
257
|
+
exclude:
|
|
258
|
+
- '**/*.group.permissions.yml'
|
|
259
|
+
types:
|
|
260
|
+
# php_basic's type, given the path value extension: the first part of a module, install,
|
|
261
|
+
# include, theme, profile, post_update.php or deploy.php file's name, which its procedural
|
|
262
|
+
# hook functions start with. Absent for any other ending. And theme_name: the name of the
|
|
263
|
+
# folder directly below custom_theme that holds an inc file, or a theme file other than the
|
|
264
|
+
# theme's own, which a theme's included files name their functions with. A type read as a tree needs its pack to pin the grammar,
|
|
265
|
+
# php_basic's pin repeated.
|
|
266
|
+
php:
|
|
267
|
+
endings: [module, install, inc, theme, profile]
|
|
268
|
+
reader: tree
|
|
269
|
+
path_values:
|
|
270
|
+
extension:
|
|
271
|
+
pattern: '^(?:.*/)?(?<name>[^/.]+)\.(?:(?:[^/]+\.)?(?:module|install|inc|theme|profile)|post_update\.php|deploy\.php)$'
|
|
272
|
+
template: '{name}'
|
|
273
|
+
theme_name:
|
|
274
|
+
pattern: '^(?<name>[^/]+)/(?!(?P=name)\.theme$)(?:[^/]+/)*[^/]+\.(?:inc|theme)$'
|
|
275
|
+
template: '{name}'
|
|
276
|
+
relative_to: custom_theme
|
|
277
|
+
|
|
278
|
+
# yaml_basic's type yml, read as data, given the path value config_owner: the first
|
|
279
|
+
# dot-separated part of a configuration file's name, the module that provides the file when
|
|
280
|
+
# it is simple configuration. Absent for core.*, which names no module.
|
|
281
|
+
yml:
|
|
282
|
+
endings: [yml]
|
|
283
|
+
reader: data
|
|
284
|
+
format: yaml
|
|
285
|
+
path_values:
|
|
286
|
+
config_owner:
|
|
287
|
+
pattern: '^(?:.*/)?(?!core\.)(?<owner>[^/.]+)\.[^/]+\.[^/.]+$'
|
|
288
|
+
template: '{owner}'
|
|
289
|
+
|
|
290
|
+
# Two text readings, beside the tree readings twig_basic and php_basic give the same files,
|
|
291
|
+
# for what a tree rule cannot reach: a call inside a template, the array form of an
|
|
292
|
+
# attachment, a docblock tag, a class constant used as an array key. Declared here, once,
|
|
293
|
+
# because the engine lets one text type claim a file ending across all packs; drupal_js_basic,
|
|
294
|
+
# drush_basic, salesforce_basic and twig_tweak_basic read them.
|
|
295
|
+
# Templates read as text with their own name as a value, beside the reading twig_basic
|
|
296
|
+
# gives them. A match that starts inside a Twig comment makes nothing.
|
|
297
|
+
drupal_template_text:
|
|
298
|
+
endings: [twig]
|
|
299
|
+
reader: text
|
|
300
|
+
path_values:
|
|
301
|
+
template_name:
|
|
302
|
+
pattern: '^(?:.*/)?(?<name>[^/]+)\.html\.twig$'
|
|
303
|
+
template: '{name}'
|
|
304
|
+
# The bundle an entity template suggestion names, as node.article for
|
|
305
|
+
# node--article--teaser. Absent for any other name.
|
|
306
|
+
bundle_suggestion:
|
|
307
|
+
pattern: '^(?:.*/)?(?<entity>node|taxonomy-term|block-content|paragraph|media|comment)--(?<bundle>[a-z][a-z0-9-]*?)--[a-z0-9]+(?:-[a-z0-9]+)*\.html\.twig$'
|
|
308
|
+
template: '{entity}.{bundle}'
|
|
309
|
+
normalize:
|
|
310
|
+
- {replace: '-', with: '_'}
|
|
311
|
+
sections:
|
|
312
|
+
- name: comment
|
|
313
|
+
open: '\{#'
|
|
314
|
+
close: '#\}'
|
|
315
|
+
# PHP read as text, beside the tree reading the PHP packs give it, for the array form of an
|
|
316
|
+
# attachment. The sections are the comments and the strings. A span is the array after
|
|
317
|
+
# '#attached' =>, and the array after 'library' =>.
|
|
318
|
+
drupal_php_text:
|
|
319
|
+
endings: [php, module, theme, inc, install, profile]
|
|
320
|
+
reader: text
|
|
321
|
+
path_values:
|
|
322
|
+
# The class a file under src holds, by Drupal's PSR-4 layout: <module>/src/A/B.php is
|
|
323
|
+
# Drupal\<module>\A\B.
|
|
324
|
+
psr4_class:
|
|
325
|
+
pattern: '^(?:.*/)?(?<module>[^/]+)/src/(?<rest>.+)\.php$'
|
|
326
|
+
template: 'Drupal\{module}\{rest}'
|
|
327
|
+
normalize:
|
|
328
|
+
- {replace: '/', with: '\'}
|
|
329
|
+
sections:
|
|
330
|
+
- name: heredoc
|
|
331
|
+
open: '<<<[ \t]*["'']?(?<label>[A-Za-z_][A-Za-z0-9_]*)'
|
|
332
|
+
close: '\n[ \t]*{label}\b'
|
|
333
|
+
- name: block_comment
|
|
334
|
+
open: '/\*'
|
|
335
|
+
close: '\*/'
|
|
336
|
+
- name: line_comment
|
|
337
|
+
open: '//'
|
|
338
|
+
close: '\n'
|
|
339
|
+
- name: hash_comment
|
|
340
|
+
open: '#[^\[\n]'
|
|
341
|
+
close: '\n'
|
|
342
|
+
- name: string
|
|
343
|
+
open: ''''
|
|
344
|
+
close: '(?:[^''\\]|\\(?s:.))*'''
|
|
345
|
+
- name: string
|
|
346
|
+
open: '"'
|
|
347
|
+
close: '(?:[^"\\]|\\(?s:.))*"'
|
|
348
|
+
spans:
|
|
349
|
+
- name: attached
|
|
350
|
+
open: '[\[,(\s][''"](?<mark>#attached)[''"]\s*=>\s*(?=\[)'
|
|
351
|
+
balance: ['[', ']']
|
|
352
|
+
- name: library_list
|
|
353
|
+
open: '[\[,(\s][''"](?<mark>library)[''"]\s*=>\s*(?=\[)'
|
|
354
|
+
balance: ['[', ']']
|
|
355
|
+
# The body of a function named theme or ending in _theme, which is where hook_theme returns
|
|
356
|
+
# its entries.
|
|
357
|
+
- name: hook_theme_body
|
|
358
|
+
open: '\b(?<mark>function)\s+(?:\w+_)?theme\s*\([^)]*\)[^{;]*(?=\{)'
|
|
359
|
+
balance: ['{', '}']
|
|
360
|
+
# The body of a named function; name is the name as written.
|
|
361
|
+
- name: function_body
|
|
362
|
+
open: '\b(?<mark>function)\s+(?<name>\w+)\s*\([^)]*\)[^{;]*(?=\{)'
|
|
363
|
+
balance: ['{', '}']
|
|
364
|
+
- name: settings_list
|
|
365
|
+
open: '[\[,(\s][''"](?<mark>drupalSettings)[''"]\s*=>\s*(?=\[)'
|
|
366
|
+
balance: ['[', ']']
|
|
367
|
+
|
|
368
|
+
grammar:
|
|
369
|
+
provider: tree-sitter
|
|
370
|
+
provider_version: "0.26.0"
|
|
371
|
+
language: php
|
|
372
|
+
grammar_version: "0.24.1"
|
|
373
|
+
# A call argument written MyType::ENTITY_TYPE, self::X or static::X stands for the text that
|
|
374
|
+
# constant is declared with, when a mapped file declares it as one text literal. A constant read
|
|
375
|
+
# as parent::X, of core, of contrib, or declared by an expression gives the row "argument N is a
|
|
376
|
+
# class constant with no declared text".
|
|
377
|
+
constant_access:
|
|
378
|
+
node: class_constant_access_expression
|
|
379
|
+
scope: [name, qualified_name, relative_scope]
|
|
380
|
+
name: [name]
|
|
381
|
+
enclosing: [self, static]
|
|
382
|
+
constant_declaration:
|
|
383
|
+
node: const_element
|
|
384
|
+
name: [name]
|
|
385
|
+
value: [string, encapsed_string]
|
|
386
|
+
|
|
387
|
+
# Name tables that call/call.yaml looks a written name up in.
|
|
388
|
+
tables:
|
|
389
|
+
# Each static method of core's Drupal class, as of Drupal 11.4, that gets one fixed service from
|
|
390
|
+
# the container, and that service. cache() names its service by its argument and is left out.
|
|
391
|
+
shortcut_services:
|
|
392
|
+
accessManager: access_manager
|
|
393
|
+
classResolver: class_resolver
|
|
394
|
+
config: config.factory
|
|
395
|
+
configFactory: config.factory
|
|
396
|
+
csrfToken: csrf_token
|
|
397
|
+
currentUser: current_user
|
|
398
|
+
database: database
|
|
399
|
+
destination: redirect.destination
|
|
400
|
+
entityDefinitionUpdateManager: entity.definition_update_manager
|
|
401
|
+
entityTypeManager: entity_type.manager
|
|
402
|
+
flood: flood
|
|
403
|
+
formBuilder: form_builder
|
|
404
|
+
hasRequest: request_stack
|
|
405
|
+
httpClient: http_client
|
|
406
|
+
isConfigSyncing: config.installer
|
|
407
|
+
keyValue: keyvalue
|
|
408
|
+
keyValueExpirable: keyvalue.expirable
|
|
409
|
+
languageManager: language_manager
|
|
410
|
+
linkGenerator: link_generator
|
|
411
|
+
lock: lock
|
|
412
|
+
logger: logger.factory
|
|
413
|
+
menuTree: menu.link_tree
|
|
414
|
+
messenger: messenger
|
|
415
|
+
moduleHandler: module_handler
|
|
416
|
+
pathValidator: path.validator
|
|
417
|
+
queue: queue
|
|
418
|
+
request: request_stack
|
|
419
|
+
requestStack: request_stack
|
|
420
|
+
routeMatch: current_route_match
|
|
421
|
+
state: state
|
|
422
|
+
theme: theme.manager
|
|
423
|
+
time: datetime.time
|
|
424
|
+
token: token
|
|
425
|
+
transliteration: transliteration
|
|
426
|
+
translation: string_translation
|
|
427
|
+
typedDataManager: typed_data_manager
|
|
428
|
+
urlGenerator: url_generator
|
|
429
|
+
# Each entity class of Drupal 11.4 core by its short name, and its entity type id. Message, the
|
|
430
|
+
# contact module's class for contact_message, is left out: the Message module's class for the
|
|
431
|
+
# entity type message has the same short name.
|
|
432
|
+
entity_classes:
|
|
433
|
+
Action: action
|
|
434
|
+
BaseFieldOverride: base_field_override
|
|
435
|
+
Block: block
|
|
436
|
+
BlockContent: block_content
|
|
437
|
+
BlockContentType: block_content_type
|
|
438
|
+
Comment: comment
|
|
439
|
+
CommentType: comment_type
|
|
440
|
+
ConfigurableLanguage: configurable_language
|
|
441
|
+
ContactForm: contact_form
|
|
442
|
+
ContentLanguageSettings: language_content_settings
|
|
443
|
+
ContentModerationState: content_moderation_state
|
|
444
|
+
DateFormat: date_format
|
|
445
|
+
Editor: editor
|
|
446
|
+
EntityFormDisplay: entity_form_display
|
|
447
|
+
EntityFormMode: entity_form_mode
|
|
448
|
+
EntityViewDisplay: entity_view_display
|
|
449
|
+
EntityViewMode: entity_view_mode
|
|
450
|
+
FieldConfig: field_config
|
|
451
|
+
FieldStorageConfig: field_storage_config
|
|
452
|
+
File: file
|
|
453
|
+
FilterFormat: filter_format
|
|
454
|
+
ImageStyle: image_style
|
|
455
|
+
Media: media
|
|
456
|
+
MediaType: media_type
|
|
457
|
+
Menu: menu
|
|
458
|
+
MenuLinkContent: menu_link_content
|
|
459
|
+
Node: node
|
|
460
|
+
NodeType: node_type
|
|
461
|
+
PathAlias: path_alias
|
|
462
|
+
ResponsiveImageStyle: responsive_image_style
|
|
463
|
+
RestResourceConfig: rest_resource_config
|
|
464
|
+
Role: user_role
|
|
465
|
+
SearchPage: search_page
|
|
466
|
+
Shortcut: shortcut
|
|
467
|
+
ShortcutSet: shortcut_set
|
|
468
|
+
Term: taxonomy_term
|
|
469
|
+
User: user
|
|
470
|
+
View: view
|
|
471
|
+
Vocabulary: taxonomy_vocabulary
|
|
472
|
+
Workflow: workflow
|
|
473
|
+
Workspace: workspace
|
|
474
|
+
|
|
475
|
+
# The core and Symfony classes and interfaces that the custom code builds on and the map never
|
|
476
|
+
# reads. Each one an inherits or implements edge reaches becomes a declared node this pack draws,
|
|
477
|
+
# with no location. A custom class that descends from a name with a type takes that type: those
|
|
478
|
+
# roles have no attribute to read. A plugin base names no type, because its attribute or
|
|
479
|
+
# annotation already gives the plugin. Contributed modules' bases belong to their own rutters.
|
|
480
|
+
boundary:
|
|
481
|
+
core_classes:
|
|
482
|
+
type: php.class_like
|
|
483
|
+
ancestry: [inherits, implements]
|
|
484
|
+
names:
|
|
485
|
+
Drupal\Component\Plugin\Attribute\Plugin: ~
|
|
486
|
+
Drupal\Component\Plugin\Derivative\DeriverBase: ~
|
|
487
|
+
Drupal\Core\Block\BlockBase: ~
|
|
488
|
+
Drupal\Core\Config\Entity\ConfigEntityBase: ~
|
|
489
|
+
Drupal\Core\Config\Entity\ConfigEntityListBuilder: ~
|
|
490
|
+
Drupal\Core\Controller\ControllerBase: drupal.controller_class
|
|
491
|
+
Drupal\Core\Entity\ContentEntityBase: ~
|
|
492
|
+
Drupal\Core\Entity\EntityAccessControlHandler: ~
|
|
493
|
+
Drupal\Core\Entity\EntityDeleteForm: ~
|
|
494
|
+
Drupal\Core\Entity\EntityForm: ~
|
|
495
|
+
Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase: ~
|
|
496
|
+
Drupal\Core\Form\ConfigFormBase: drupal.config_form_class
|
|
497
|
+
Drupal\Core\Form\ConfirmFormBase: ~
|
|
498
|
+
Drupal\Core\Form\FormBase: drupal.form_class
|
|
499
|
+
Drupal\Core\Mail\Plugin\Mail\PhpMail: ~
|
|
500
|
+
Drupal\Core\Plugin\DefaultPluginManager: ~
|
|
501
|
+
Drupal\Core\Plugin\PluginBase: ~
|
|
502
|
+
Drupal\Core\Queue\QueueWorkerBase: ~
|
|
503
|
+
Drupal\Core\Routing\RouteSubscriberBase: ~
|
|
504
|
+
Drupal\KernelTests\Components\ComponentKernelTestBase: ~
|
|
505
|
+
Drupal\KernelTests\KernelTestBase: ~
|
|
506
|
+
Drupal\Tests\BrowserTestBase: ~
|
|
507
|
+
Drupal\Tests\UnitTestCase: ~
|
|
508
|
+
Symfony\Component\Validator\Constraint: ~
|
|
509
|
+
Symfony\Component\Validator\ConstraintValidator: ~
|
|
510
|
+
Symfony\Contracts\EventDispatcher\Event: ~
|
|
511
|
+
core_interfaces:
|
|
512
|
+
type: php.interface
|
|
513
|
+
ancestry: [inherits, implements]
|
|
514
|
+
names:
|
|
515
|
+
Drupal\Component\Plugin\PluginInspectionInterface: ~
|
|
516
|
+
Drupal\Core\Ajax\CommandInterface: ~
|
|
517
|
+
Drupal\Core\Cache\CacheableDependencyInterface: ~
|
|
518
|
+
Drupal\Core\DependencyInjection\ContainerInjectionInterface: ~
|
|
519
|
+
Drupal\Core\DependencyInjection\ServiceModifierInterface: ~
|
|
520
|
+
Drupal\Core\Entity\EntityHandlerInterface: ~
|
|
521
|
+
Drupal\Core\Flood\FloodInterface: ~
|
|
522
|
+
Drupal\Core\Form\FormInterface: ~
|
|
523
|
+
Drupal\Core\Lock\LockBackendInterface: ~
|
|
524
|
+
Drupal\Core\Plugin\ContainerFactoryPluginInterface: ~
|
|
525
|
+
Drupal\Core\Plugin\Discovery\ContainerDeriverInterface: ~
|
|
526
|
+
Drupal\Core\Queue\QueueInterface: ~
|
|
527
|
+
Drupal\Core\Routing\Access\AccessInterface: ~
|
|
528
|
+
Symfony\Component\EventDispatcher\EventSubscriberInterface: drupal.event_subscriber_class
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A permission read from a permissions file, one per top-level key that has a title. One rule. The
|
|
4
|
+
# key permission_callbacks is a list, not a permission, and has no title.
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- rule: permission_from_permissions_file
|
|
8
|
+
reads: file
|
|
9
|
+
in:
|
|
10
|
+
- module_root
|
|
11
|
+
match:
|
|
12
|
+
file: '*.permissions'
|
|
13
|
+
filetype: yaml
|
|
14
|
+
each: '*'
|
|
15
|
+
where:
|
|
16
|
+
- has_key:
|
|
17
|
+
path: title
|
|
18
|
+
id:
|
|
19
|
+
from: key
|
|
20
|
+
emits:
|
|
21
|
+
- node:
|
|
22
|
+
type: drupal.permission
|
|
23
|
+
- attribute:
|
|
24
|
+
name: title
|
|
25
|
+
from:
|
|
26
|
+
key: title
|
|
27
|
+
confidence: declared
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A queue worker plugin, named by its plugin id; plugin_class joins it to its class. It ends at the
|
|
4
|
+
# same type and id namespace whichever way it is declared.
|
|
5
|
+
|
|
6
|
+
node_types:
|
|
7
|
+
- name: drupal.queue_worker_plugin
|
|
8
|
+
parent: drupal.plugin
|
|
9
|
+
id_namespace: drupal.plugin.queue_worker
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A queue worker plugin declared by the QueueWorker docblock annotation on its class. Two rules
|
|
4
|
+
# because a rule that emits an edge emits no node. An id that is not text in double quotes makes no
|
|
5
|
+
# plugin and is listed under skipped in the map report.
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- rule: queue_worker_from_annotation
|
|
9
|
+
reads: file
|
|
10
|
+
in:
|
|
11
|
+
- queue_worker_classes
|
|
12
|
+
match:
|
|
13
|
+
annotation: QueueWorker
|
|
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.queue_worker_plugin
|
|
24
|
+
confidence: declared
|
|
25
|
+
- rule: queue_worker_from_annotation_edges
|
|
26
|
+
reads: file
|
|
27
|
+
in:
|
|
28
|
+
- queue_worker_classes
|
|
29
|
+
match:
|
|
30
|
+
annotation: QueueWorker
|
|
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 queue worker plugin declared by the QueueWorker attribute on its class. Two rules because a rule
|
|
4
|
+
# that emits an edge emits no node. An id that is not a text literal makes no plugin and is listed
|
|
5
|
+
# under skipped in the map report.
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- rule: queue_worker_from_attribute
|
|
9
|
+
reads: file
|
|
10
|
+
in:
|
|
11
|
+
- queue_worker_classes
|
|
12
|
+
match:
|
|
13
|
+
attribute: Drupal\Core\Queue\Attribute\QueueWorker
|
|
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.queue_worker_plugin
|
|
24
|
+
confidence: declared
|
|
25
|
+
- rule: queue_worker_from_attribute_edges
|
|
26
|
+
reads: file
|
|
27
|
+
in:
|
|
28
|
+
- queue_worker_classes
|
|
29
|
+
match:
|
|
30
|
+
attribute: Drupal\Core\Queue\Attribute\QueueWorker
|
|
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,8 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A REST resource plugin, named by its plugin id; plugin_class joins it to its class.
|
|
4
|
+
|
|
5
|
+
node_types:
|
|
6
|
+
- name: drupal.rest_resource
|
|
7
|
+
parent: drupal.plugin
|
|
8
|
+
id_namespace: drupal.plugin.rest_resource
|