Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

spfx-assurance: Offline Release Checks for SharePoint Framework Projects

说明与用途

spfx-assurance 是一个离线 CLI 工具,用于在发布前检查 SharePoint Framework 项目中的常见错误,如重复 ID、危险 URL 和秘密泄露,并生成 JSON/Markdown 报告,帮助开发者在部署前修复问题。

问题

SharePoint Framework (SPFx) web parts often fail during release due to issues like invalid manifests, duplicate component IDs, unsafe URLs, committed secrets, missing tenant approvals, or build failures that surface only at deployment time.

结果

spfx-assurance provides a fast, offline validation step that identifies common SPFx release issues, reducing costly deployment failures and ensuring code quality before tenant interaction.

工作流

  • 1. Install spfx-assurance via npx or locally.
  • 2. Run npx spfx-assurance check . --json assurance.json --md assurance.md --fail-on blocked in the project root.
  • 3. Review the generated JSON/Markdown reports for verified, warning, blocked, and skipped items.
  • 4. Address any blocked or warning issues (e.g., duplicate IDs, unsafe URLs, secret assignments).
  • 5. Re-run the check until all critical issues are resolved before proceeding to release.

证据

The MVP checks: package and SPFx metadata; Node engine mismatch; solution metadata and four-part version; component manifest shape and duplicate IDs; secret-shaped assignments; unsafe URL schemes at obvious sinks; non-local HTTP URLs; webApiPermissionRequests requiring tenant admin approval; configured build/test commands.

来源

The tool makes no network calls, accepts no credentials, and does not modify the project being inspected.

来源

  • 记录日期: 2026-09-09T03:00:43.437Z