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 Salesforce mapping field plugin declared by the generic Plugin docblock annotation on its class,
|
|
4
|
+
# in the mapping field folder. Two rules because a rule that emits an edge emits no node. An id that
|
|
5
|
+
# is not text in double quotes makes no plugin and is listed under skipped in the map report.
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- rule: salesforce_mapping_field_from_annotation
|
|
9
|
+
reads: file
|
|
10
|
+
in:
|
|
11
|
+
- salesforce_mapping_field_classes
|
|
12
|
+
match:
|
|
13
|
+
annotation: Plugin
|
|
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.salesforce_mapping_field
|
|
24
|
+
confidence: declared
|
|
25
|
+
- rule: salesforce_mapping_field_from_annotation_edges
|
|
26
|
+
reads: file
|
|
27
|
+
in:
|
|
28
|
+
- salesforce_mapping_field_classes
|
|
29
|
+
match:
|
|
30
|
+
annotation: Plugin
|
|
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,26 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-manifest.schema.json"
|
|
2
|
+
|
|
3
|
+
# twig pack — text only, no grammar. Written to test whether a stack with no
|
|
4
|
+
# tree-sitter grammar is mappable at all.
|
|
5
|
+
#
|
|
6
|
+
# It has no `grammar:` block. Every rule matches text with a pattern and mints ids from the
|
|
7
|
+
# captures. If this works, the floor for adding a stack is "someone writes patterns", not
|
|
8
|
+
# "someone writes a grammar" — and tree-sitter becomes an optimisation for the languages
|
|
9
|
+
# that have one, rather than a requirement.
|
|
10
|
+
|
|
11
|
+
pack: twig
|
|
12
|
+
version: 0.0.1
|
|
13
|
+
depends: []
|
|
14
|
+
|
|
15
|
+
folders:
|
|
16
|
+
source: ./
|
|
17
|
+
|
|
18
|
+
files:
|
|
19
|
+
extensions: [twig]
|
|
20
|
+
exclude: []
|
|
21
|
+
|
|
22
|
+
identity:
|
|
23
|
+
qualified_name:
|
|
24
|
+
parts: [path]
|
|
25
|
+
case_folding:
|
|
26
|
+
sensitive: [all]
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# twig pack — the template and the names it references. Text rules only.
|
|
4
|
+
#
|
|
5
|
+
# `twig.reference`, not `twig.variable`, and `inferred`, not `declared`. A pattern grabs the
|
|
6
|
+
# first word after {{ and cannot tell these apart:
|
|
7
|
+
#
|
|
8
|
+
# {{ way }} a variable
|
|
9
|
+
# {{ way|upper }} a variable with a filter
|
|
10
|
+
# {{ path('front') }} a function call
|
|
11
|
+
# {{ user.name }} a property on an object
|
|
12
|
+
#
|
|
13
|
+
# A grammar would separate them; a pattern gives back `way`, `way`, `path`, `user`. So the
|
|
14
|
+
# pack claims what it can actually see — a name is referenced here — and marks it inferred.
|
|
15
|
+
# The alternative is calling `path` a variable, which is a wrong entry in a committed map.
|
|
16
|
+
|
|
17
|
+
node_types:
|
|
18
|
+
- name: twig.template
|
|
19
|
+
id_namespace: twig.template
|
|
20
|
+
- name: twig.reference
|
|
21
|
+
edge_kinds:
|
|
22
|
+
- kind: references
|
|
23
|
+
from: twig.template
|
|
24
|
+
to: twig.reference
|
|
25
|
+
rules:
|
|
26
|
+
- rule: template_file
|
|
27
|
+
reads: file
|
|
28
|
+
in:
|
|
29
|
+
- source
|
|
30
|
+
match:
|
|
31
|
+
file: '*'
|
|
32
|
+
filetype: twig
|
|
33
|
+
id:
|
|
34
|
+
from: file_stem
|
|
35
|
+
emits:
|
|
36
|
+
- node:
|
|
37
|
+
type: twig.template
|
|
38
|
+
confidence: declared
|
|
39
|
+
- rule: template_references
|
|
40
|
+
reads: file
|
|
41
|
+
in:
|
|
42
|
+
- source
|
|
43
|
+
match:
|
|
44
|
+
file: '*'
|
|
45
|
+
filetype: twig
|
|
46
|
+
id:
|
|
47
|
+
from: file_stem
|
|
48
|
+
emits:
|
|
49
|
+
- edge:
|
|
50
|
+
kind: references
|
|
51
|
+
from: this_node
|
|
52
|
+
to:
|
|
53
|
+
each: true
|
|
54
|
+
from: text
|
|
55
|
+
pattern: \{\{\s*(?P<var>[a-z_][a-z0-9_]*)
|
|
56
|
+
template: twig.reference::{var}
|
|
57
|
+
confidence: inferred
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-manifest.schema.json"
|
|
2
|
+
|
|
3
|
+
# The smallest template pack: it claims the twig extension and nothing else. It has no grammar, so
|
|
4
|
+
# a file of this type is never parsed; a whole-file rule that names the filetype needs only the
|
|
5
|
+
# file's name.
|
|
6
|
+
pack: twig_basic
|
|
7
|
+
version: 0.1.0
|
|
8
|
+
depends: []
|
|
9
|
+
|
|
10
|
+
files:
|
|
11
|
+
extensions: [twig]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-manifest.schema.json"
|
|
2
|
+
|
|
3
|
+
# Known gaps. This pack maps the Twig functions of the contributed module Twig Tweak that name a
|
|
4
|
+
# Drupal thing by a quoted first argument, each as an edge from the template that calls it:
|
|
5
|
+
# drupal_block('plugin_id') to the block plugin, drupal_menu('name') to the config object
|
|
6
|
+
# system.menu.<name>, drupal_entity('type', ...) and drupal_entity_form('type', ...) to the entity
|
|
7
|
+
# type, and drupal_field('field', 'type', ...) to the config object field.storage.<type>.<field>.
|
|
8
|
+
# Each line below was seen on real code or on a planted file.
|
|
9
|
+
# - drupal_view, drupal_region, drupal_config, drupal_image, drupal_token, drupal_contextual_links
|
|
10
|
+
# and drupal_breadcrumb: no rule. The site this pack was written on calls none of them.
|
|
11
|
+
# - drupal_messages() and drupal_url() name nothing a node stands for: no edge.
|
|
12
|
+
# - A name held in a variable or joined from parts, as drupal_block(block_id): no edge, and no
|
|
13
|
+
# skipped row.
|
|
14
|
+
# - drupal_entity('webform', 'x') and drupal_entity('block_content', 6) end at the entity type,
|
|
15
|
+
# not at the entity. A config entity named by its id, such as the webform x, is not reached.
|
|
16
|
+
# - drupal_field ends at the field storage. The bundle and the field instance are not named by
|
|
17
|
+
# the call and get no edge.
|
|
18
|
+
# - A Twig file not named .html.twig, such as a component's <name>.twig: no edge, since it is
|
|
19
|
+
# no template node. On the site this pack was written on, such files hold no call.
|
|
20
|
+
# - A call inside a Twig comment makes nothing. A call inside a quoted text or a verbatim block
|
|
21
|
+
# still gives an edge.
|
|
22
|
+
# - Two templates of one name, in two modules, are one template node, so their edges join.
|
|
23
|
+
# - The text type is drupal_basic's drupal_template_text. The engine lets one text type claim
|
|
24
|
+
# the ending twig across all packs.
|
|
25
|
+
pack: twig_tweak_basic
|
|
26
|
+
version: 0.0.1
|
|
27
|
+
depends: [drupal_basic]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# {{ drupal_block('plugin_id', {...}) }}: the template renders the block plugin the call names.
|
|
4
|
+
|
|
5
|
+
edge_kinds:
|
|
6
|
+
- kind: renders_block
|
|
7
|
+
from: drupal.template
|
|
8
|
+
to: drupal.block_plugin
|
|
9
|
+
|
|
10
|
+
rules:
|
|
11
|
+
- rule: block_rendered_in_template
|
|
12
|
+
reads: file
|
|
13
|
+
in: [module_root, theme_root]
|
|
14
|
+
match:
|
|
15
|
+
file: '*.html'
|
|
16
|
+
filetype: drupal_template_text
|
|
17
|
+
text: 'drupal_block\(\s*[''"](?<plugin>[^''"\s]+)[''"]'
|
|
18
|
+
id: {template: '{template_name}'}
|
|
19
|
+
emits: [{edge: {kind: renders_block, from: this_node, to: {from: {capture: plugin}}}}]
|
|
20
|
+
confidence: declared
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# {{ drupal_entity('entity_type', id) }} renders an entity of that type, and
|
|
4
|
+
# {{ drupal_entity_form('entity_type', ...) }} renders a form of one. Each is an edge to the entity
|
|
5
|
+
# type; the entity itself is named by a value the template holds at run time.
|
|
6
|
+
|
|
7
|
+
edge_kinds:
|
|
8
|
+
- kind: renders_entity_type
|
|
9
|
+
from: drupal.template
|
|
10
|
+
to: drupal.entity_type
|
|
11
|
+
- kind: renders_entity_form
|
|
12
|
+
from: drupal.template
|
|
13
|
+
to: drupal.entity_type
|
|
14
|
+
|
|
15
|
+
rules:
|
|
16
|
+
- rule: entity_rendered_in_template
|
|
17
|
+
reads: file
|
|
18
|
+
in: [module_root, theme_root]
|
|
19
|
+
match:
|
|
20
|
+
file: '*.html'
|
|
21
|
+
filetype: drupal_template_text
|
|
22
|
+
text: 'drupal_entity\(\s*[''"](?<entity_type>[^''"\s]+)[''"]'
|
|
23
|
+
id: {template: '{template_name}'}
|
|
24
|
+
emits: [{edge: {kind: renders_entity_type, from: this_node, to: {from: {capture: entity_type}}}}]
|
|
25
|
+
confidence: declared
|
|
26
|
+
- rule: entity_form_rendered_in_template
|
|
27
|
+
reads: file
|
|
28
|
+
in: [module_root, theme_root]
|
|
29
|
+
match:
|
|
30
|
+
file: '*.html'
|
|
31
|
+
filetype: drupal_template_text
|
|
32
|
+
text: 'drupal_entity_form\(\s*[''"](?<entity_type>[^''"\s]+)[''"]'
|
|
33
|
+
id: {template: '{template_name}'}
|
|
34
|
+
emits: [{edge: {kind: renders_entity_form, from: this_node, to: {from: {capture: entity_type}}}}]
|
|
35
|
+
confidence: declared
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# {{ drupal_field('field_name', 'entity_type', id) }}: the template renders the field, whose storage
|
|
4
|
+
# config object is field.storage.<entity_type>.<field_name>.
|
|
5
|
+
|
|
6
|
+
edge_kinds:
|
|
7
|
+
- kind: renders_field
|
|
8
|
+
from: drupal.template
|
|
9
|
+
to: drupal.field_storage
|
|
10
|
+
|
|
11
|
+
rules:
|
|
12
|
+
- rule: field_rendered_in_template
|
|
13
|
+
reads: file
|
|
14
|
+
in: [module_root, theme_root]
|
|
15
|
+
match:
|
|
16
|
+
file: '*.html'
|
|
17
|
+
filetype: drupal_template_text
|
|
18
|
+
text: 'drupal_field\(\s*[''"](?<field>[^''"\s]+)[''"]\s*,\s*[''"](?<entity_type>[^''"\s]+)[''"]'
|
|
19
|
+
id: {template: '{template_name}'}
|
|
20
|
+
emits: [{edge: {kind: renders_field, from: this_node, to: {template: 'field.storage.{entity_type}.{field}'}}}]
|
|
21
|
+
confidence: declared
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# {{ drupal_menu('menu_name') }}: the template renders the menu, whose config object is
|
|
4
|
+
# system.menu.<menu_name>.
|
|
5
|
+
|
|
6
|
+
edge_kinds:
|
|
7
|
+
- kind: renders_menu
|
|
8
|
+
from: drupal.template
|
|
9
|
+
to: drupal.config_object
|
|
10
|
+
|
|
11
|
+
rules:
|
|
12
|
+
- rule: menu_rendered_in_template
|
|
13
|
+
reads: file
|
|
14
|
+
in: [module_root, theme_root]
|
|
15
|
+
match:
|
|
16
|
+
file: '*.html'
|
|
17
|
+
filetype: drupal_template_text
|
|
18
|
+
text: 'drupal_menu\(\s*[''"](?<menu>[^''"\s]+)[''"]'
|
|
19
|
+
id: {template: '{template_name}'}
|
|
20
|
+
emits: [{edge: {kind: renders_menu, from: this_node, to: {template: 'system.menu.{menu}'}}}]
|
|
21
|
+
confidence: declared
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A webform read from its config file as the bundle webform_submission.<id>, the id drupal_basic gives a field or
|
|
4
|
+
# display of it. Two rules: the node with its label, and its edges.
|
|
5
|
+
|
|
6
|
+
rules:
|
|
7
|
+
- rule: bundle_webform_submission_from_config
|
|
8
|
+
reads: file
|
|
9
|
+
in:
|
|
10
|
+
- config
|
|
11
|
+
- module_config
|
|
12
|
+
match:
|
|
13
|
+
file: webform.webform.*
|
|
14
|
+
filetype: yaml
|
|
15
|
+
id:
|
|
16
|
+
from: file_stem
|
|
17
|
+
normalize:
|
|
18
|
+
- {replace: '^webform\.webform\.', with: 'webform_submission.'}
|
|
19
|
+
emits:
|
|
20
|
+
- node:
|
|
21
|
+
type: drupal.bundle
|
|
22
|
+
- attribute:
|
|
23
|
+
name: label
|
|
24
|
+
from:
|
|
25
|
+
key: title
|
|
26
|
+
confidence: declared
|
|
27
|
+
- rule: bundle_webform_submission_from_config_edges
|
|
28
|
+
reads: file
|
|
29
|
+
in:
|
|
30
|
+
- config
|
|
31
|
+
- module_config
|
|
32
|
+
match:
|
|
33
|
+
file: webform.webform.*
|
|
34
|
+
filetype: yaml
|
|
35
|
+
id:
|
|
36
|
+
from: file_stem
|
|
37
|
+
normalize:
|
|
38
|
+
- {replace: '^webform\.webform\.', with: 'webform_submission.'}
|
|
39
|
+
emits:
|
|
40
|
+
- edge:
|
|
41
|
+
kind: configured_by
|
|
42
|
+
from: this_node
|
|
43
|
+
to:
|
|
44
|
+
from:
|
|
45
|
+
key: id
|
|
46
|
+
template: 'webform.webform.{id}'
|
|
47
|
+
- edge:
|
|
48
|
+
kind: bundle_of
|
|
49
|
+
from: this_node
|
|
50
|
+
to:
|
|
51
|
+
from:
|
|
52
|
+
key: id
|
|
53
|
+
template: 'webform_submission'
|
|
54
|
+
confidence: declared
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-manifest.schema.json"
|
|
2
|
+
|
|
3
|
+
# The Webform contributed module: its handler plugins, by annotation, each joined to its class by
|
|
4
|
+
# plugin_class; and each webform, from its config file, as the bundle webform_submission.<id> with
|
|
5
|
+
# its label (key title), a configured_by edge to that file and a bundle_of edge to the entity type
|
|
6
|
+
# webform_submission.
|
|
7
|
+
#
|
|
8
|
+
# Known gaps: an id that is not text in double quotes makes no plugin and is listed under skipped.
|
|
9
|
+
# A handler declared by an attribute gives nothing: this pack reads the annotation only, and the
|
|
10
|
+
# attribute class was not checked against a Webform release. Webform's other plugin types, such as
|
|
11
|
+
# elements and exporters, give nothing. A webform's elements, handlers and settings in its config
|
|
12
|
+
# file give nothing, nor does its category or status. The entity type webform_submission is
|
|
13
|
+
# declared by the module's PHP, which is not mapped, so it stays referenced.
|
|
14
|
+
pack: webform_basic
|
|
15
|
+
version: 0.0.1
|
|
16
|
+
depends: [drupal_basic, php_basic]
|
|
17
|
+
|
|
18
|
+
folders:
|
|
19
|
+
# The folder the handler manager discovers in, below a module's src folder.
|
|
20
|
+
webform_handler_classes: "{module_root}/src/Plugin/WebformHandler/**"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A Webform handler plugin, named by its plugin id; plugin_class joins it to its class.
|
|
4
|
+
|
|
5
|
+
node_types:
|
|
6
|
+
- name: drupal.webform_handler
|
|
7
|
+
parent: drupal.plugin
|
|
8
|
+
id_namespace: drupal.plugin.webform_handler
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# A Webform handler plugin declared by the WebformHandler docblock annotation on its class. Two
|
|
4
|
+
# rules because a rule that emits an edge emits no node. An id that is not text in double quotes
|
|
5
|
+
# makes no plugin and is listed under skipped in the map report.
|
|
6
|
+
|
|
7
|
+
rules:
|
|
8
|
+
- rule: webform_handler_from_annotation
|
|
9
|
+
reads: file
|
|
10
|
+
in:
|
|
11
|
+
- webform_handler_classes
|
|
12
|
+
match:
|
|
13
|
+
annotation: WebformHandler
|
|
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.webform_handler
|
|
24
|
+
confidence: declared
|
|
25
|
+
- rule: webform_handler_from_annotation_edges
|
|
26
|
+
reads: file
|
|
27
|
+
in:
|
|
28
|
+
- webform_handler_classes
|
|
29
|
+
match:
|
|
30
|
+
annotation: WebformHandler
|
|
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,72 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-manifest.schema.json"
|
|
2
|
+
|
|
3
|
+
# YAML pack — SKETCH
|
|
4
|
+
#
|
|
5
|
+
# Written because transcribing the block_ways map found that the Drupal pack cannot open a
|
|
6
|
+
# single YAML file. It declares `drupal.config_object` with
|
|
7
|
+
# `find: {file: "config/sync/*.yml", …}` while `files` claims only `php` plus
|
|
8
|
+
# [module, inc, install, theme, profile, engine]. No `.yml` is ever selected, so every
|
|
9
|
+
# block placement, the view, the menu and the module's own info file are invisible — the
|
|
10
|
+
# entire half of a Drupal codebase this tool exists to map.
|
|
11
|
+
#
|
|
12
|
+
# The fix is not a second `grammar:` block on the Drupal pack. A domain pack must not own a
|
|
13
|
+
# language, or every domain pack that touches YAML re-declares the same grammar and they
|
|
14
|
+
# drift. YAML is a pack, PHP is a pack, and Drupal depends on both — the same mechanism as
|
|
15
|
+
# javascript -> react -> nextjs, used for a second language rather than a second layer.
|
|
16
|
+
#
|
|
17
|
+
# What follows from that: the grammar is chosen by the file's extension, and the
|
|
18
|
+
# extension-to-grammar mapping belongs to whichever pack claimed the extension. A `find`
|
|
19
|
+
# rule naming `file: "config/install/*.yml"` needs no grammar field — `.yml` resolves to
|
|
20
|
+
# this pack's grammar because this pack claimed it. Nothing new in the format.
|
|
21
|
+
#
|
|
22
|
+
# Sketch, not a pack. It carries what block_ways actually needed and stops there.
|
|
23
|
+
|
|
24
|
+
# ======================================================================================
|
|
25
|
+
pack: yaml
|
|
26
|
+
version: 0.0.1
|
|
27
|
+
depends: []
|
|
28
|
+
# A root of the graph, with nothing beneath it, exactly like php. There is no "language
|
|
29
|
+
# pack" kind for it to be an instance of.
|
|
30
|
+
# ======================================================================================
|
|
31
|
+
|
|
32
|
+
grammar:
|
|
33
|
+
provider: tree-sitter
|
|
34
|
+
provider_version: "0.26.13" # tree-sitter runtime, released 2026-08-23
|
|
35
|
+
language: yaml
|
|
36
|
+
grammar_version: "0.7.1" # tree-sitter-yaml
|
|
37
|
+
# Pinned exactly, never a range. Node type names carry no stability guarantee across a
|
|
38
|
+
# grammar's minor release (tree-sitter issue #2611), so a range lets a rule that matched
|
|
39
|
+
# yesterday match nothing today, silently. UNVERIFIED: the two version numbers above are
|
|
40
|
+
# placeholders in the shape the other packs use. Neither has been checked against a
|
|
41
|
+
# published release, and both must be before this sketch becomes a pack.
|
|
42
|
+
|
|
43
|
+
folders:
|
|
44
|
+
source: ./
|
|
45
|
+
|
|
46
|
+
files:
|
|
47
|
+
extensions: [yml, yaml]
|
|
48
|
+
exclude: []
|
|
49
|
+
# YAML the language excludes nothing. Every real exclusion — a lock file, a vendored
|
|
50
|
+
# bundle, a CI cache — is a convention of some framework or one project, so it belongs to
|
|
51
|
+
# the pack or the settings file that knows the convention. Same posture as php.
|
|
52
|
+
|
|
53
|
+
# --------------------------------------------------------------------------------------
|
|
54
|
+
# Identity.
|
|
55
|
+
#
|
|
56
|
+
# A YAML file has no name inside it. Nothing in the document says what the document is
|
|
57
|
+
# called, which is the opposite of PHP and the same as a React module: the path carries the
|
|
58
|
+
# identity.
|
|
59
|
+
#
|
|
60
|
+
# So this pack mints ids from the path and stops. What a config name means — that
|
|
61
|
+
# `core.entity_view_display.block_content.block_ways_note.default` is an entity view
|
|
62
|
+
# display for one bundle — is Drupal's knowledge, not YAML's, and the rule that reads it
|
|
63
|
+
# belongs to the Drupal pack.
|
|
64
|
+
# --------------------------------------------------------------------------------------
|
|
65
|
+
identity:
|
|
66
|
+
qualified_name:
|
|
67
|
+
parts:
|
|
68
|
+
- from: path
|
|
69
|
+
relative_to: project_root
|
|
70
|
+
as: file_path
|
|
71
|
+
case_folding:
|
|
72
|
+
sensitive: [all]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# yaml pack — finds a mapping entry. One rule.
|
|
4
|
+
#
|
|
5
|
+
# Emitted only where a dependent pack asks for it with a path expression, never for every
|
|
6
|
+
# key in every file. `each: "services.*"` in the Drupal pack and `each: "*"` for menu links
|
|
7
|
+
# are that expression, and how it is written is the open question this sketch does not
|
|
8
|
+
# close.
|
|
9
|
+
|
|
10
|
+
needs:
|
|
11
|
+
types: [yaml.mapping_entry]
|
|
12
|
+
|
|
13
|
+
rules:
|
|
14
|
+
|
|
15
|
+
- rule: find_mapping_entry
|
|
16
|
+
reads: file
|
|
17
|
+
in: [source]
|
|
18
|
+
match: {declaration: block_mapping_pair, name_child: key}
|
|
19
|
+
id: {from: qualified_name}
|
|
20
|
+
emits: [{node: {type: yaml.mapping_entry}}]
|
|
21
|
+
confidence: declared
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-file.schema.json"
|
|
2
|
+
|
|
3
|
+
# yaml pack — the node types and the containment edge. Kept out of pack.yaml because the
|
|
4
|
+
# manifest schema refuses a manifest that also holds types.
|
|
5
|
+
|
|
6
|
+
# --------------------------------------------------------------------------------------
|
|
7
|
+
# Node types.
|
|
8
|
+
#
|
|
9
|
+
# Two, and deliberately no more. A pack that declared yaml.scalar and yaml.sequence would
|
|
10
|
+
# be re-emitting the parse tree as a graph, which is a different tool. The mapping node
|
|
11
|
+
# exists only so a dependent pack has something to attach a `contains` edge to when one
|
|
12
|
+
# file declares several things — `block_ways.links.menu.yml` declares three menu link
|
|
13
|
+
# plugins and is itself no config object.
|
|
14
|
+
# --------------------------------------------------------------------------------------
|
|
15
|
+
node_types:
|
|
16
|
+
|
|
17
|
+
- name: yaml.file
|
|
18
|
+
container: true
|
|
19
|
+
|
|
20
|
+
- name: yaml.mapping_entry
|
|
21
|
+
parent: yaml.file
|
|
22
|
+
container: true
|
|
23
|
+
|
|
24
|
+
edge_kinds:
|
|
25
|
+
|
|
26
|
+
- kind: contains
|
|
27
|
+
from: [yaml.file, yaml.mapping_entry]
|
|
28
|
+
to: yaml.mapping_entry
|
|
29
|
+
source: nearest_enclosing_container
|
|
30
|
+
confidence: declared
|
|
31
|
+
|
|
32
|
+
# --------------------------------------------------------------------------------------
|
|
33
|
+
# What this pack deliberately does not have.
|
|
34
|
+
#
|
|
35
|
+
# No resolution section. A YAML scalar that happens to read like a name is a string, and
|
|
36
|
+
# nothing in the language makes it a reference. Every reference in a Drupal config file —
|
|
37
|
+
# `plugin: block_ways_attribute`, `menu_name: block-ways-demo`, a dependency list — is
|
|
38
|
+
# meaningful only because Drupal says so. Putting a name-matching rule here would fabricate
|
|
39
|
+
# edges in every YAML file of every stack.
|
|
40
|
+
#
|
|
41
|
+
# why: this is the same failure as the global lowercased name map that fused a PHP
|
|
42
|
+
# `Exception` with an unrelated TypeScript class. Matching by shape rather than by a
|
|
43
|
+
# declared rule is how phantom edges get made.
|
|
44
|
+
# --------------------------------------------------------------------------------------
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
$schema: "https://periplus.dev/schema/0/pack-manifest.schema.json"
|
|
2
|
+
|
|
3
|
+
# The smallest YAML pack: it claims the two extensions and nothing else. A rule that names the
|
|
4
|
+
# filetype yaml selects files by this list, so the claim lives here and in no rule.
|
|
5
|
+
pack: yaml_basic
|
|
6
|
+
version: 0.1.0
|
|
7
|
+
depends: []
|
|
8
|
+
|
|
9
|
+
files:
|
|
10
|
+
extensions: [yml, yaml]
|