定制 electriccitizen/bolt-inspect 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

electriccitizen/bolt-inspect

Composer 安装命令:

composer require electriccitizen/bolt-inspect

包简介

Drupal site introspection and test content management for Bolt CLI

README 文档

README

Generated at 2026-04-27

Bolt Inspect — Documentation

Drupal 11+ module that exposes a site's structure and manages disposable test content for the Bolt CLI test runner. This module is the in-Drupal half of Bolt; the Node.js CLI shells out to it via Drush.

Item Value
Package electriccitizen/bolt-inspect
Module name bolt_inspect
Version 0.5.0
Drupal core ^11
PHP >=8.1
Drush services ^13
Required ext ext-gd (placeholder image generation)
License GPL-2.0-or-later

What it does

  1. Profile the site (drush bolt-inspect:profile) — emits a single JSON document describing content types, paragraph bundles, fields, menus, media types, enabled and custom modules, accessible frontend routes, representative URLs, and sample referenceable entities. This is the contract Bolt's plugins read to decide what to test.
  2. Generate test content (drush bolt-inspect:generate) — creates one unpublished node per content type, populating required fields (and any field referenced by an auto_entitylabel token pattern). Supporting entities (terms, media, files, paragraphs) are created on demand and tracked.
  3. Render-check (drush bolt-inspect:render-check) — renders each generated test node in isolation and reports per-bundle status.
  4. Cleanup (drush bolt-inspect:cleanup) — deletes everything that was tracked, in reverse creation order. Uninstalling the module also wipes public://bolt-test/ and the tracking state.

The module is designed to leave no traces: tracked-only deletion, state cleared on uninstall, no config entities, no schema changes.

Documents in this directory

  • commands.md — Drush command reference and example output.
  • site-profile.md — JSON contract emitted by bolt-inspect:profile, field-by-field.
  • architecture.md — services, classes, file layout, and how Bolt CLI consumes the module.

Install (standalone)

composer require electriccitizen/bolt-inspect
drush en bolt_inspect -y
drush bolt-inspect:profile | jq .

In normal use you never install this module directly — bolt init does it from the host project. See the Bolt CLI README for the host-side flow.

Uninstall

drush pmu bolt_inspect -y
composer remove electriccitizen/bolt-inspect

hook_uninstall() deletes the bolt_inspect.tracked_entities state key and recursively removes public://bolt-test/. Run drush bolt-inspect:cleanup first if tracked entities still exist — once the module is uninstalled, the tracker is gone and stragglers must be deleted by hand.

Revisions

Date Change
2026-04-27 Initial documentation set for v0.5.0.

统计信息

  • 总下载量: 125
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2026-03-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固