npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

powerplatform-review-tool

v1.1.0

Published

Evaluate Power Platform solution zip files based on best practice patterns

Readme

Power Platform Review Tool

npm version

🔍 A CLI and JavaScript utility to evaluate Power Platform Solution ZIPs based on best practice patterns for Power Apps, Power Automate, and Copilot (Power Virtual Agents).


✨ Features

  • 🏛️ Analyze Power Platform Solutions - Parse and evaluate .zip solution files
  • 🧠 Best Practice Evaluation - Comprehensive pattern analysis against industry standards
  • 📊 SARIF Output - Industry-standard Static Analysis Results Interchange Format
  • ⚙️ Multi-Component Support - Canvas Apps, Power Automate, Copilot, and Dataverse
  • 📃 Dual Interface - CLI for automation and Node.js module for integration
  • Detailed Extraction - Complete metadata export with Mermaid diagram generation
  • 🚀 CI/CD Ready - Perfect for GitHub Actions, Azure DevOps, and other pipelines
  • 📈 Solution Scoring - Percentage-based quality metrics

📦 Installation

Global Installation (Recommended for CLI)

npm install -g @powercat-tools/powerplatform-review-tool

After global installation, the pp-review command will be available system-wide.

Local Project Installation

npm install @powercat-tools/powerplatform-review-tool

Then use with npx:

npx pp-review review -f ./MySolution.zip -o review-result.json

Development Installation

For contributing or testing:

git clone <repository-url>
cd powerplatform-review-tool
npm install
npm link  # Makes pp-review available locally

🚀 Usage (CLI)

Review a solution:

pp-review review -f <path-to-solution.zip> -o <output-file>

Extract metadata without evaluation:

pp-review extract -f <path-to-solution.zip> -o <output-file>

🔁 Examples

Review a solution and generate a SARIF report:

pp-review review -f "./MySolution.zip" -o review-result.json

Extract metadata from a solution zip:

pp-review extract -f "./MySolution.zip" -o solution-details.json

Display help:

pp-review --help
pp-review review --help
pp-review extract --help

💡 Options

| Flag | Description | Required | |----------------|------------------------------------------|----------| | -f, --file | Path to the solution zip file | ✅ Yes | | -o, --output | Output path for the resulting JSON | ✅ Yes |


📜 Usage (as a JavaScript/TypeScript Module)

You can use the tool programmatically in your applications. The package supports both CommonJS (require) and ES modules (import) for maximum compatibility.

📦 Module Formats

  • ES Modules (.mjs) - For modern browsers, React, Vite, and Node.js with "type": "module"
  • CommonJS (.cjs) - For Node.js with require() and legacy projects

The package automatically selects the correct format based on your environment.

Node.js Example (Extract Solution Details)

import { extractSolutionDetail } from 'powerplatform-review-tool';
import fs from 'fs';

const zipBuffer = fs.readFileSync('./MySolution.zip');
const solutionDetails = await extractSolutionDetail(zipBuffer);
console.log(JSON.stringify(solutionDetails, null, 2));

Node.js Example (Review Solution)

import { startReview } from 'powerplatform-review-tool';
import fs from 'fs';

const zipBuffer = fs.readFileSync('./MySolution.zip');
const reviewResult = await startReview(zipBuffer, undefined, null, []);
console.log(JSON.stringify(reviewResult, null, 2));

React/Browser Example

The package works seamlessly in React applications and browsers with modern bundlers like Vite or Webpack:

import { extractSolutionDetail, startReview } from 'powerplatform-review-tool';
import type { SolutionDetails } from 'powerplatform-review-tool';

function SolutionReviewer() {
  const handleFileUpload = async (file: File) => {
    // Convert File to ArrayBuffer
    const arrayBuffer = await file.arrayBuffer();
    const buffer = Buffer.from(arrayBuffer);
    
    // Extract solution details
    const details: SolutionDetails = await extractSolutionDetail(buffer);
    console.log('Solution:', details.solutionOverview.displayName);
    
    // Run review
    const review = await startReview(buffer);
    console.log('Score:', review?.SolutionScore);
  };
  
  return (
    <input 
      type="file" 
      accept=".zip" 
      onChange={(e) => e.target.files?.[0] && handleFileUpload(e.target.files[0])}
    />
  );
}

💡 Note for Browser Usage: You'll need the buffer package polyfill for browser environments:

npm install buffer

A complete React demo is available in the repository at src/powerplatform-review-react-demo.

Available Exports

import { 
  startReview,              // Run full review with best practice analysis
  extractSolutionDetail,    // Extract metadata only (apps, flows, tables, etc.)
  generateSarifFromReview,  // Convert review results to SARIF format
  getItemsFromDataset,      // Utility for PCF dataset mapping
  ReviewSchema              // Zod schema for validation
} from 'powerplatform-review-tool';

// Type definitions are also exported
import type { SolutionDetails, ReviewResult } from 'powerplatform-review-tool';

CommonJS Usage (Node.js)

const { startReview, extractSolutionDetail } = require('powerplatform-review-tool');
const fs = require('fs');

const zipBuffer = fs.readFileSync('./MySolution.zip');
const reviewResult = await startReview(zipBuffer, undefined, null, []);
console.log(JSON.stringify(reviewResult, null, 2));

🧰 Pattern Types Supported

The tool evaluates solutions against comprehensive best practice patterns:

Canvas Apps

  • ✅ Screen and control naming conventions
  • ✅ Performance optimization patterns
  • ✅ Accessibility compliance
  • ✅ Code reusability patterns

Power Automate Flows

  • ✅ Error handling implementation
  • ✅ Connection reference usage
  • ✅ Action configuration best practices
  • ✅ Flow structure and design patterns

Copilot Studio Agent (Full Experience)

  • ✅ Topic organization and structure
  • ✅ Entity and variable usage
  • ✅ Authentication configuration
  • ✅ Conversation design patterns

Dataverse

  • ✅ Table and field naming conventions
  • ✅ Relationship configurations
  • ✅ Security role definitions

All patterns are easily extendable through the shared pattern library.


🛠️ Integration Examples

✅ GitHub Action

- name: Review Power Platform Solution
  run: |
    npx pp-review review -f ./solutions/Solution.zip -o review-result.json

✅ Azure DevOps Pipeline

- script: |
    npx pp-review review -f "$(Build.SourcesDirectory)/Solution.zip" -o review-result.json
  displayName: 'Run Power Platform Review Tool'

🧪 Testing & Development

Running Tests

Test projects are included in the repository to verify all functionality:

Node.js Tests (CLI + Programmatic API):

cd src/powerplatform-review-tool-tests
npm run test:all          # Run all tests (CLI + Node.js)
npm run test:cli:help     # Show help
npm run test:cli:extract  # Test extraction
npm run test:cli:review   # Test review
npm run test:node         # Test Node.js programmatic usage

React/Browser Demo:

cd src/powerplatform-review-react-demo
npm install
npm run dev               # Start Vite dev server at http://localhost:5173

The test projects validate:

  • ✅ CLI command execution
  • ✅ Node.js programmatic API (CommonJS with require)
  • ✅ ES module imports (Node.js with import)
  • ✅ Browser/React usage with Vite bundler
  • ✅ Solution metadata extraction
  • ✅ Review scoring and SARIF output generation
  • ✅ TypeScript type definitions

Example Output

Extract Command:

pp-review extract -f ./MySolution.zip -o ./output/solution-details.json

Generates a JSON file with:

  • Canvas apps with screens and controls
  • Power Automate flows with actions
  • Dataverse tables and relationships
  • Mermaid diagrams for visualization
  • Copilot/Agent configurations

Review Command:

pp-review review -f ./MySolution.zip -o ./output/review-results.json

Generates a SARIF-formatted file with:

  • Overall solution score (percentage)
  • Best practice violations by category
  • Detailed findings with severity levels
  • Recommendations for improvement

👨‍💼 Author

Developed with ❤️ by Ramakrishnan


📄 License

MIT