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,43 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A field formatter declared by the FieldFormatter attribute on its class, the twin of the
|
|
4
|
+
# annotation rule. Two rules because a rule that emits an edge emits no node. An id that is not a
|
|
5
|
+
# text literal makes no formatter and is listed under skipped.
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- rule: field_formatter_from_attribute
|
|
9
|
+
reads: file
|
|
10
|
+
in:
|
|
11
|
+
- field_formatter_classes
|
|
12
|
+
match:
|
|
13
|
+
attribute: Drupal\Core\Field\Attribute\FieldFormatter
|
|
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.field_formatter
|
|
24
|
+
confidence: declared
|
|
25
|
+
- rule: field_formatter_from_attribute_edges
|
|
26
|
+
reads: file
|
|
27
|
+
in:
|
|
28
|
+
- field_formatter_classes
|
|
29
|
+
match:
|
|
30
|
+
attribute: Drupal\Core\Field\Attribute\FieldFormatter
|
|
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,46 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A field type declared by the FieldType docblock annotation on its class. An id that is
|
|
4
|
+
# not text in double quotes makes no field type and is listed under skipped.
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- rule: field_type_from_annotation
|
|
8
|
+
reads: file
|
|
9
|
+
in:
|
|
10
|
+
- field_type_classes
|
|
11
|
+
match:
|
|
12
|
+
annotation: FieldType
|
|
13
|
+
filetype: php
|
|
14
|
+
where:
|
|
15
|
+
- applies_to: class_declaration
|
|
16
|
+
id:
|
|
17
|
+
from:
|
|
18
|
+
annotation_key: id
|
|
19
|
+
must_be: string_literal
|
|
20
|
+
emits:
|
|
21
|
+
- node:
|
|
22
|
+
type: drupal.field_type
|
|
23
|
+
- attribute:
|
|
24
|
+
name: label
|
|
25
|
+
from:
|
|
26
|
+
annotation_key: label
|
|
27
|
+
confidence: declared
|
|
28
|
+
- rule: field_type_from_annotation_edges
|
|
29
|
+
reads: file
|
|
30
|
+
in:
|
|
31
|
+
- field_type_classes
|
|
32
|
+
match:
|
|
33
|
+
annotation: FieldType
|
|
34
|
+
filetype: php
|
|
35
|
+
where:
|
|
36
|
+
- applies_to: class_declaration
|
|
37
|
+
id:
|
|
38
|
+
from:
|
|
39
|
+
annotation_key: id
|
|
40
|
+
must_be: string_literal
|
|
41
|
+
emits:
|
|
42
|
+
- edge:
|
|
43
|
+
kind: plugin_class
|
|
44
|
+
from: this_node
|
|
45
|
+
to: enclosing_class
|
|
46
|
+
confidence: declared
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A field type plugin, named by its plugin id; plugin_class joins it to its class.
|
|
4
|
+
|
|
5
|
+
node_types:
|
|
6
|
+
- name: drupal.field_type
|
|
7
|
+
parent: drupal.plugin
|
|
8
|
+
id_namespace: drupal.plugin.field_type
|
|
9
|
+
|
|
10
|
+
# A field type declared by the FieldType attribute on its class, the twin of the
|
|
11
|
+
# annotation rule. Two rules because a rule that emits an edge emits no node. An id that is not a
|
|
12
|
+
# text literal makes no field type and is listed under skipped.
|
|
13
|
+
|
|
14
|
+
rules:
|
|
15
|
+
- rule: field_type_from_attribute
|
|
16
|
+
reads: file
|
|
17
|
+
in:
|
|
18
|
+
- field_type_classes
|
|
19
|
+
match:
|
|
20
|
+
attribute: Drupal\Core\Field\Attribute\FieldType
|
|
21
|
+
filetype: php
|
|
22
|
+
where:
|
|
23
|
+
- applies_to: class_declaration
|
|
24
|
+
id:
|
|
25
|
+
from:
|
|
26
|
+
attribute_argument: id
|
|
27
|
+
must_be: string_literal
|
|
28
|
+
emits:
|
|
29
|
+
- node:
|
|
30
|
+
type: drupal.field_type
|
|
31
|
+
confidence: declared
|
|
32
|
+
- rule: field_type_from_attribute_edges
|
|
33
|
+
reads: file
|
|
34
|
+
in:
|
|
35
|
+
- field_type_classes
|
|
36
|
+
match:
|
|
37
|
+
attribute: Drupal\Core\Field\Attribute\FieldType
|
|
38
|
+
filetype: php
|
|
39
|
+
where:
|
|
40
|
+
- applies_to: class_declaration
|
|
41
|
+
id:
|
|
42
|
+
from:
|
|
43
|
+
attribute_argument: id
|
|
44
|
+
must_be: string_literal
|
|
45
|
+
emits:
|
|
46
|
+
- edge:
|
|
47
|
+
kind: plugin_class
|
|
48
|
+
from: this_node
|
|
49
|
+
to: enclosing_class
|
|
50
|
+
confidence: declared
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A field widget declared by the FieldWidget docblock annotation on its class. An id that is
|
|
4
|
+
# not text in double quotes makes no field widget and is listed under skipped.
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- rule: field_widget_from_annotation
|
|
8
|
+
reads: file
|
|
9
|
+
in:
|
|
10
|
+
- field_widget_classes
|
|
11
|
+
match:
|
|
12
|
+
annotation: FieldWidget
|
|
13
|
+
filetype: php
|
|
14
|
+
where:
|
|
15
|
+
- applies_to: class_declaration
|
|
16
|
+
id:
|
|
17
|
+
from:
|
|
18
|
+
annotation_key: id
|
|
19
|
+
must_be: string_literal
|
|
20
|
+
emits:
|
|
21
|
+
- node:
|
|
22
|
+
type: drupal.field_widget
|
|
23
|
+
- attribute:
|
|
24
|
+
name: label
|
|
25
|
+
from:
|
|
26
|
+
annotation_key: label
|
|
27
|
+
confidence: declared
|
|
28
|
+
- rule: field_widget_from_annotation_edges
|
|
29
|
+
reads: file
|
|
30
|
+
in:
|
|
31
|
+
- field_widget_classes
|
|
32
|
+
match:
|
|
33
|
+
annotation: FieldWidget
|
|
34
|
+
filetype: php
|
|
35
|
+
where:
|
|
36
|
+
- applies_to: class_declaration
|
|
37
|
+
id:
|
|
38
|
+
from:
|
|
39
|
+
annotation_key: id
|
|
40
|
+
must_be: string_literal
|
|
41
|
+
emits:
|
|
42
|
+
- edge:
|
|
43
|
+
kind: plugin_class
|
|
44
|
+
from: this_node
|
|
45
|
+
to: enclosing_class
|
|
46
|
+
confidence: declared
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A field widget plugin, named by its plugin id; plugin_class joins it to its class.
|
|
4
|
+
|
|
5
|
+
node_types:
|
|
6
|
+
- name: drupal.field_widget
|
|
7
|
+
parent: drupal.plugin
|
|
8
|
+
id_namespace: drupal.plugin.field_widget
|
|
9
|
+
|
|
10
|
+
# A field widget declared by the FieldWidget attribute on its class, the twin of the
|
|
11
|
+
# annotation rule. Two rules because a rule that emits an edge emits no node. An id that is not a
|
|
12
|
+
# text literal makes no field widget and is listed under skipped.
|
|
13
|
+
|
|
14
|
+
rules:
|
|
15
|
+
- rule: field_widget_from_attribute
|
|
16
|
+
reads: file
|
|
17
|
+
in:
|
|
18
|
+
- field_widget_classes
|
|
19
|
+
match:
|
|
20
|
+
attribute: Drupal\Core\Field\Attribute\FieldWidget
|
|
21
|
+
filetype: php
|
|
22
|
+
where:
|
|
23
|
+
- applies_to: class_declaration
|
|
24
|
+
id:
|
|
25
|
+
from:
|
|
26
|
+
attribute_argument: id
|
|
27
|
+
must_be: string_literal
|
|
28
|
+
emits:
|
|
29
|
+
- node:
|
|
30
|
+
type: drupal.field_widget
|
|
31
|
+
confidence: declared
|
|
32
|
+
- rule: field_widget_from_attribute_edges
|
|
33
|
+
reads: file
|
|
34
|
+
in:
|
|
35
|
+
- field_widget_classes
|
|
36
|
+
match:
|
|
37
|
+
attribute: Drupal\Core\Field\Attribute\FieldWidget
|
|
38
|
+
filetype: php
|
|
39
|
+
where:
|
|
40
|
+
- applies_to: class_declaration
|
|
41
|
+
id:
|
|
42
|
+
from:
|
|
43
|
+
attribute_argument: id
|
|
44
|
+
must_be: string_literal
|
|
45
|
+
emits:
|
|
46
|
+
- edge:
|
|
47
|
+
kind: plugin_class
|
|
48
|
+
from: this_node
|
|
49
|
+
to: enclosing_class
|
|
50
|
+
confidence: declared
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A form id: the name a form class's getFormId returns, as my_form, and the name configuration
|
|
4
|
+
# gives a form by. A class under src whose getFormId returns a quoted literal declares the id and
|
|
5
|
+
# links to it, read as text as '#theme' is. Three contributed configuration keys name core and
|
|
6
|
+
# custom form ids, so they are read here: a captcha point's formId, and honeypot.settings'
|
|
7
|
+
# unprotected_forms list and form_settings keys. A form id no class returns, such as a core form's,
|
|
8
|
+
# ends at a referenced node. A getFormId that returns a constant or a concatenation gives nothing.
|
|
9
|
+
node_types:
|
|
10
|
+
- name: drupal.form_id
|
|
11
|
+
id_namespace: drupal.form_id
|
|
12
|
+
|
|
13
|
+
edge_kinds:
|
|
14
|
+
- kind: form_has_id
|
|
15
|
+
from: php.class
|
|
16
|
+
to: drupal.form_id
|
|
17
|
+
- kind: config_names_form
|
|
18
|
+
from: drupal.config_object
|
|
19
|
+
to: drupal.form_id
|
|
20
|
+
|
|
21
|
+
rules:
|
|
22
|
+
- rule: form_id_returned
|
|
23
|
+
reads: file
|
|
24
|
+
in: [source]
|
|
25
|
+
match:
|
|
26
|
+
file: '**'
|
|
27
|
+
filetype: drupal_php_text
|
|
28
|
+
text: '\bfunction\s+getFormId\s*\(\s*\)[^{;]*\{\s*return\s+[''"](?<form>[A-Za-z0-9_]+)[''"]\s*;'
|
|
29
|
+
id: {template: '{form}'}
|
|
30
|
+
line: {capture: form}
|
|
31
|
+
emits: [{node: {type: drupal.form_id}}]
|
|
32
|
+
confidence: declared
|
|
33
|
+
|
|
34
|
+
- rule: form_class_has_id
|
|
35
|
+
reads: file
|
|
36
|
+
in: [source]
|
|
37
|
+
match:
|
|
38
|
+
file: '**'
|
|
39
|
+
filetype: drupal_php_text
|
|
40
|
+
text: '\bfunction\s+getFormId\s*\(\s*\)[^{;]*\{\s*return\s+[''"](?<form>[A-Za-z0-9_]+)[''"]\s*;'
|
|
41
|
+
id: {template: '{form}'}
|
|
42
|
+
line: {capture: form}
|
|
43
|
+
emits:
|
|
44
|
+
- edge:
|
|
45
|
+
kind: form_has_id
|
|
46
|
+
from: {template: '{psr4_class}', types: [php.class]}
|
|
47
|
+
to: this_node
|
|
48
|
+
confidence: declared
|
|
49
|
+
|
|
50
|
+
- rule: captcha_point_form
|
|
51
|
+
reads: file
|
|
52
|
+
in: [config, module_config]
|
|
53
|
+
match:
|
|
54
|
+
file: captcha.captcha_point.*
|
|
55
|
+
filetype: yaml
|
|
56
|
+
id: {from: file_stem}
|
|
57
|
+
emits:
|
|
58
|
+
- edge:
|
|
59
|
+
kind: config_names_form
|
|
60
|
+
from: this_node
|
|
61
|
+
to: {from: {key: formId}}
|
|
62
|
+
confidence: declared
|
|
63
|
+
|
|
64
|
+
- rule: honeypot_forms
|
|
65
|
+
reads: file
|
|
66
|
+
in: [config, module_config]
|
|
67
|
+
match:
|
|
68
|
+
file: honeypot.settings
|
|
69
|
+
filetype: yaml
|
|
70
|
+
id: {from: file_stem}
|
|
71
|
+
emits:
|
|
72
|
+
- edge:
|
|
73
|
+
kind: config_names_form
|
|
74
|
+
from: this_node
|
|
75
|
+
to: {from: {key: unprotected_forms}, each: true}
|
|
76
|
+
- edge:
|
|
77
|
+
kind: config_names_form
|
|
78
|
+
from: this_node
|
|
79
|
+
to: {from: [{each: form_settings.*}], template: '{key}'}
|
|
80
|
+
confidence: declared
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A hook, named without its hook_ prefix, and the method or function that implements it.
|
|
4
|
+
|
|
5
|
+
node_types:
|
|
6
|
+
- name: drupal.hook
|
|
7
|
+
id_namespace: drupal.hook
|
|
8
|
+
|
|
9
|
+
edge_kinds:
|
|
10
|
+
- kind: implements_hook
|
|
11
|
+
from: [php.method, php.function]
|
|
12
|
+
to: drupal.hook
|
|
13
|
+
- kind: hook_acts_on_entity_type
|
|
14
|
+
from: drupal.hook
|
|
15
|
+
to: drupal.entity_type
|
|
16
|
+
|
|
17
|
+
# A function that implements a hook by its name: in a module, install, include, theme, profile,
|
|
18
|
+
# post_update.php or deploy.php file, the first part of the file name, an underscore, then the
|
|
19
|
+
# hook's name. Every update_N function implements the one hook update_N, every post-update
|
|
20
|
+
# function the one hook post_update_NAME and every deploy function the one hook deploy_NAME; the
|
|
21
|
+
# number or the name stays in the function's name. The hook collector of Drupal 11.1 goes by the name too and takes no list of
|
|
22
|
+
# hook names. It leaves out install, uninstall, schema and update_N functions, which Drupal's
|
|
23
|
+
# installer and update system call; this rule keeps them. Themes name their hook functions the
|
|
24
|
+
# same way. Inferred, because a name is a convention.
|
|
25
|
+
#
|
|
26
|
+
# Gaps: any prefixed function reads as a hook, such as the form callback mymod_settings_submit,
|
|
27
|
+
# the helper mymod_build_list or mymod_update_NEXT. A file named other than its module gives no
|
|
28
|
+
# hook. A theme file named other than its theme, such as includes/content.theme holding mytheme_
|
|
29
|
+
# functions, is read by the theme's folder name, by hook_theme_include.yaml. A hook with a variable
|
|
30
|
+
# part keeps it, so mymod_form_user_login_form_alter names the hook form_user_login_form_alter. A
|
|
31
|
+
# function in a file of another ending leaves two skipped rows.
|
|
32
|
+
|
|
33
|
+
rules:
|
|
34
|
+
- rule: hook_from_function_name
|
|
35
|
+
reads: file
|
|
36
|
+
in:
|
|
37
|
+
- source
|
|
38
|
+
match: {declaration: function_definition, name_child: name, filetype: php}
|
|
39
|
+
id:
|
|
40
|
+
from: declared_name
|
|
41
|
+
pattern: '^{extension}_(?<hook>\w+)$'
|
|
42
|
+
template: '{hook}'
|
|
43
|
+
normalize:
|
|
44
|
+
- {replace: '^update_\d+$', with: 'update_N'}
|
|
45
|
+
- {replace: '^post_update_\w+$', with: 'post_update_NAME'}
|
|
46
|
+
- {replace: '^deploy_\w+$', with: 'deploy_NAME'}
|
|
47
|
+
emits:
|
|
48
|
+
- node:
|
|
49
|
+
type: drupal.hook
|
|
50
|
+
confidence: inferred
|
|
51
|
+
- rule: function_implements_hook
|
|
52
|
+
reads: file
|
|
53
|
+
in:
|
|
54
|
+
- source
|
|
55
|
+
match: {declaration: function_definition, name_child: name, filetype: php}
|
|
56
|
+
id:
|
|
57
|
+
from: declared_name
|
|
58
|
+
pattern: '^{extension}_(?<hook>\w+)$'
|
|
59
|
+
template: '{hook}'
|
|
60
|
+
normalize:
|
|
61
|
+
- {replace: '^update_\d+$', with: 'update_N'}
|
|
62
|
+
- {replace: '^post_update_\w+$', with: 'post_update_NAME'}
|
|
63
|
+
- {replace: '^deploy_\w+$', with: 'deploy_NAME'}
|
|
64
|
+
emits:
|
|
65
|
+
- edge:
|
|
66
|
+
kind: implements_hook
|
|
67
|
+
from: {declared: php.function}
|
|
68
|
+
to: this_node
|
|
69
|
+
confidence: inferred
|
|
70
|
+
|
|
71
|
+
# A hook named for an entity type and an operation, such as node_presave or my_entity_insert,
|
|
72
|
+
# links to the entity type it acts on. The operations are those Drupal defines as
|
|
73
|
+
# hook_ENTITY_TYPE_<operation>; the type is the shortest part before one of them. Generic entity_
|
|
74
|
+
# hooks act on every type and get no edge. Hooks of other subsystems that share the shape are left
|
|
75
|
+
# out: block_view and block_view_alter (block rendering), contextual_links_view_alter, the
|
|
76
|
+
# views_ hooks, the theme layer's preprocess_ and theme_ hooks, such as preprocess_views_view
|
|
77
|
+
# and theme_suggestions_views_view_alter, and the jsonapi_, language_fallback_candidates_ and
|
|
78
|
+
# post_update_ hooks. Inferred, because a name is a convention.
|
|
79
|
+
#
|
|
80
|
+
# A hook named by a Hook attribute gets the same edge from hook_attribute.yaml.
|
|
81
|
+
#
|
|
82
|
+
# Gaps: an entity type whose id starts with entity_ gets none. Another subsystem's hook of the
|
|
83
|
+
# same shape, not listed above, gives a false edge, and so does a helper read as a hook, such as
|
|
84
|
+
# user_cookie_delete or node_mass_update; it ends at a referenced drupal.entity_type node, here
|
|
85
|
+
# cookie or mass.
|
|
86
|
+
- rule: hook_acts_on_entity_type
|
|
87
|
+
reads: file
|
|
88
|
+
in:
|
|
89
|
+
- source
|
|
90
|
+
match: {declaration: function_definition, name_child: name, filetype: php}
|
|
91
|
+
id:
|
|
92
|
+
from: declared_name
|
|
93
|
+
pattern: '^{extension}_(?!entity_|block_view(?:_alter)?$|contextual_links_view_alter$|views_|preprocess_|theme_|jsonapi_|language_fallback_candidates_|post_update_)(?<etype>\w+?)_(?<op>access|create_access|create|presave|insert|update|predelete|delete|preload|load|storage_load|view|view_alter|build_defaults_alter|prepare_form|field_values_init|duplicate|revision_create|revision_delete|translation_create|translation_insert|translation_delete)$'
|
|
94
|
+
template: '{etype}'
|
|
95
|
+
emits:
|
|
96
|
+
- edge:
|
|
97
|
+
kind: hook_acts_on_entity_type
|
|
98
|
+
from: {declared: drupal.hook}
|
|
99
|
+
to: this_node
|
|
100
|
+
confidence: inferred
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A method that implements a hook by the Hook attribute. The hook is named by the attribute's first
|
|
4
|
+
# argument, or by the argument named hook, and is a referenced node; the method is the node
|
|
5
|
+
# php_basic finds. Two rules, one per way of naming it.
|
|
6
|
+
#
|
|
7
|
+
# A third links a hook the attribute names, such as #[Hook('node_presave')], to the entity type it
|
|
8
|
+
# acts on, by the name pattern and exclusions of hook.yaml's hook_acts_on_entity_type. Read as text,
|
|
9
|
+
# because the engine takes an id pattern only on a declaration rule and no edge end from an
|
|
10
|
+
# attribute argument except as its target. Text sees no namespace, so any attribute written
|
|
11
|
+
# Hook( counts, and a hook name given as a constant gives nothing. A hook whose first part is no
|
|
12
|
+
# entity type, not excluded here, ends at a referenced drupal.entity_type node of that name.
|
|
13
|
+
|
|
14
|
+
rules:
|
|
15
|
+
- rule: hook_from_attribute
|
|
16
|
+
reads: file
|
|
17
|
+
in:
|
|
18
|
+
- source
|
|
19
|
+
match:
|
|
20
|
+
attribute: Drupal\Core\Hook\Attribute\Hook
|
|
21
|
+
filetype: php
|
|
22
|
+
where:
|
|
23
|
+
- applies_to: method_declaration
|
|
24
|
+
emits:
|
|
25
|
+
- edge:
|
|
26
|
+
kind: implements_hook
|
|
27
|
+
from: enclosing_method
|
|
28
|
+
to:
|
|
29
|
+
from:
|
|
30
|
+
attribute_argument: '0'
|
|
31
|
+
confidence: declared
|
|
32
|
+
- rule: hook_from_named_attribute
|
|
33
|
+
reads: file
|
|
34
|
+
in:
|
|
35
|
+
- source
|
|
36
|
+
match:
|
|
37
|
+
attribute: Drupal\Core\Hook\Attribute\Hook
|
|
38
|
+
filetype: php
|
|
39
|
+
where:
|
|
40
|
+
- applies_to: method_declaration
|
|
41
|
+
emits:
|
|
42
|
+
- edge:
|
|
43
|
+
kind: implements_hook
|
|
44
|
+
from: enclosing_method
|
|
45
|
+
to:
|
|
46
|
+
from:
|
|
47
|
+
attribute_argument: hook
|
|
48
|
+
confidence: declared
|
|
49
|
+
- rule: hook_attribute_acts_on_entity_type
|
|
50
|
+
reads: file
|
|
51
|
+
in:
|
|
52
|
+
- source
|
|
53
|
+
match:
|
|
54
|
+
file: '**'
|
|
55
|
+
filetype: drupal_php_text
|
|
56
|
+
text: '#\[Hook\(\s*(?:hook:\s*)?[''"](?<hook>(?!entity_|block_view(?:_alter)?[''"]|contextual_links_view_alter[''"]|views_|preprocess_|theme_|jsonapi_|language_fallback_candidates_|post_update_)(?<etype>\w+?)_(?:access|create_access|create|presave|insert|update|predelete|delete|preload|load|storage_load|view|view_alter|build_defaults_alter|prepare_form|field_values_init|duplicate|revision_create|revision_delete|translation_create|translation_insert|translation_delete))[''"]'
|
|
57
|
+
id: {template: '{etype}'}
|
|
58
|
+
line: {capture: hook}
|
|
59
|
+
emits:
|
|
60
|
+
- edge:
|
|
61
|
+
kind: hook_acts_on_entity_type
|
|
62
|
+
from: {template: '{hook}', types: [drupal.hook]}
|
|
63
|
+
to: this_node
|
|
64
|
+
confidence: inferred
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A function in a file a theme includes, such as preprocess/html.preprocess.inc or
|
|
4
|
+
# includes/content.theme, that implements a hook by its name: the theme's folder name, an
|
|
5
|
+
# underscore, then the hook's name. Drupal finds such a function by the theme's name, not the
|
|
6
|
+
# file's. The rules read files claimed by the .inc and .theme endings, so a file such as
|
|
7
|
+
# helpers.inc is read too. theme_name is absent for the theme's own .theme file, which
|
|
8
|
+
# hook_from_function_name reads; there each rule leaves one skipped row. Inferred, because a name
|
|
9
|
+
# is a convention, and because Drupal 12 collects legacy hooks only from the theme's own .theme
|
|
10
|
+
# file, so a function in an included file fires only when the theme includes that file.
|
|
11
|
+
|
|
12
|
+
rules:
|
|
13
|
+
- rule: hook_from_theme_include
|
|
14
|
+
reads: file
|
|
15
|
+
in:
|
|
16
|
+
- theme_root
|
|
17
|
+
match: {declaration: function_definition, name_child: name, filetype: php, ending: [inc, theme]}
|
|
18
|
+
id: {from: declared_name, pattern: '^{theme_name}_(?<hook>\w+)$', template: '{hook}'}
|
|
19
|
+
emits:
|
|
20
|
+
- node:
|
|
21
|
+
type: drupal.hook
|
|
22
|
+
confidence: inferred
|
|
23
|
+
- rule: theme_include_implements_hook
|
|
24
|
+
reads: file
|
|
25
|
+
in:
|
|
26
|
+
- theme_root
|
|
27
|
+
match: {declaration: function_definition, name_child: name, filetype: php, ending: [inc, theme]}
|
|
28
|
+
id: {from: declared_name, pattern: '^{theme_name}_(?<hook>\w+)$', template: '{hook}'}
|
|
29
|
+
emits:
|
|
30
|
+
- edge:
|
|
31
|
+
kind: implements_hook
|
|
32
|
+
from: {declared: php.function}
|
|
33
|
+
to: this_node
|
|
34
|
+
confidence: inferred
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A library, named module/name as every dependency on it writes it.
|
|
4
|
+
|
|
5
|
+
node_types:
|
|
6
|
+
- name: drupal.library
|
|
7
|
+
id_namespace: drupal.library
|
|
8
|
+
|
|
9
|
+
edge_kinds:
|
|
10
|
+
- kind: depends_on_library
|
|
11
|
+
from: drupal.library
|
|
12
|
+
to: drupal.library
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A library read from a libraries file, one per top-level key. Two rules because a rule that emits
|
|
4
|
+
# an edge emits no node. The stem is viewer_3d.libraries, so the id drops .libraries before the
|
|
5
|
+
# slash and reads viewer_3d/viewer_3d.
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- rule: library_from_libraries_file
|
|
9
|
+
reads: file
|
|
10
|
+
in:
|
|
11
|
+
- module_root
|
|
12
|
+
- theme_root
|
|
13
|
+
match:
|
|
14
|
+
file: '*.libraries'
|
|
15
|
+
filetype: yaml
|
|
16
|
+
each: '*'
|
|
17
|
+
id:
|
|
18
|
+
from:
|
|
19
|
+
- file_stem
|
|
20
|
+
- key
|
|
21
|
+
template: '{file_stem}/{key}'
|
|
22
|
+
normalize:
|
|
23
|
+
- replace: \.libraries/
|
|
24
|
+
with: /
|
|
25
|
+
emits:
|
|
26
|
+
- node:
|
|
27
|
+
type: drupal.library
|
|
28
|
+
- attribute:
|
|
29
|
+
name: version
|
|
30
|
+
from:
|
|
31
|
+
key: version
|
|
32
|
+
confidence: declared
|
|
33
|
+
- rule: library_from_libraries_file_edges
|
|
34
|
+
reads: file
|
|
35
|
+
in:
|
|
36
|
+
- module_root
|
|
37
|
+
- theme_root
|
|
38
|
+
match:
|
|
39
|
+
file: '*.libraries'
|
|
40
|
+
filetype: yaml
|
|
41
|
+
each: '*'
|
|
42
|
+
id:
|
|
43
|
+
from:
|
|
44
|
+
- file_stem
|
|
45
|
+
- key
|
|
46
|
+
template: '{file_stem}/{key}'
|
|
47
|
+
normalize:
|
|
48
|
+
- replace: \.libraries/
|
|
49
|
+
with: /
|
|
50
|
+
emits:
|
|
51
|
+
- edge:
|
|
52
|
+
kind: depends_on_library
|
|
53
|
+
from: this_node
|
|
54
|
+
to:
|
|
55
|
+
from:
|
|
56
|
+
key: dependencies
|
|
57
|
+
each: true
|
|
58
|
+
confidence: declared
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A local action, named by its key in a links.action file.
|
|
4
|
+
|
|
5
|
+
node_types:
|
|
6
|
+
- name: drupal.local_action
|
|
7
|
+
id_namespace: drupal.local_action
|
|
8
|
+
|
|
9
|
+
edge_kinds:
|
|
10
|
+
- kind: appears_on_route
|
|
11
|
+
from: drupal.local_action
|
|
12
|
+
to: drupal.route
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A local action read from a links.action file, one per top-level key. Two rules because a rule
|
|
4
|
+
# that emits an edge emits no node.
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- rule: local_action_from_links_file
|
|
8
|
+
reads: file
|
|
9
|
+
in:
|
|
10
|
+
- module_root
|
|
11
|
+
match:
|
|
12
|
+
file: '*.links.action'
|
|
13
|
+
filetype: yaml
|
|
14
|
+
each: '*'
|
|
15
|
+
id:
|
|
16
|
+
from: key
|
|
17
|
+
emits:
|
|
18
|
+
- node:
|
|
19
|
+
type: drupal.local_action
|
|
20
|
+
- attribute:
|
|
21
|
+
name: title
|
|
22
|
+
from:
|
|
23
|
+
key: title
|
|
24
|
+
confidence: declared
|
|
25
|
+
- rule: local_action_from_links_file_edges
|
|
26
|
+
reads: file
|
|
27
|
+
in:
|
|
28
|
+
- module_root
|
|
29
|
+
match:
|
|
30
|
+
file: '*.links.action'
|
|
31
|
+
filetype: yaml
|
|
32
|
+
each: '*'
|
|
33
|
+
id:
|
|
34
|
+
from: key
|
|
35
|
+
emits:
|
|
36
|
+
- edge:
|
|
37
|
+
kind: links_to_route
|
|
38
|
+
from: this_node
|
|
39
|
+
to:
|
|
40
|
+
from:
|
|
41
|
+
key: route_name
|
|
42
|
+
- edge:
|
|
43
|
+
kind: appears_on_route
|
|
44
|
+
from: this_node
|
|
45
|
+
to:
|
|
46
|
+
from:
|
|
47
|
+
key: appears_on
|
|
48
|
+
each: true
|
|
49
|
+
confidence: declared
|