Skip to content

microsoft/power-platform-skills / plugins/power-pages/skills/migrate-webapi-selectall

migrate-webapi-selectall

Verified

Reviews and migrates deprecated wildcard (*) values in Power Pages Web API fields site settings to least-privilege explicit Dataverse columns. Use whenever a user mentions Web API wildcard or select-all remediation, fields settings containing *, data-exposure review, wildcard deprecation readiness, or Web API failures after wildcard retirement. Applies to both non-SPA sites using HTML, CSS, JavaScript, Liquid, and downloaded YAML, and SPA sites using React, Vue, Angular, Astro, or TypeScript. The agent must inspect every source Web API call and consumer, report exact fixes for every wildcard, report every already-explicit configuration, apply approved edits, and verify no wildcard remains.

scripts/render-migration-report.js

View on GitHub
#!/usr/bin/env node
'use strict';

const fs = require('fs');
const path = require('path');
const { renderTemplate, parseArgs } = require('../../../scripts/lib/render-template');

const HELP = `
Renders the Web API wildcard migration report from a data file.

Usage:
  node render-migration-report.js --output <path> --data <json-file>

Options:
  --output   HTML report to write; must not already exist
  --data     JSON data file describing the migration
  --help     Show this help message

Required keys in the data file:
  REPORT_STATUS, SCOPE_NOTE, WILDCARD_DATA, EXPLICIT_DATA

WILDCARD_DATA and EXPLICIT_DATA are arrays of:
  { setting, status, usages: [{ location, detail }], fields, finding, fix }

Exit codes:
  0  Report written
  1  Missing flag, unreadable data file, missing key, or existing output

Example:
  node render-migration-report.js --output docs/webapi-selectall-migration/migration-report.html --data docs/webapi-selectall-migration/migration-report.json
`;

// UTC keeps the stamp unambiguous across reader regions.
// dateStyle and timeStyle cannot combine with timeZoneName.
function formatGeneratedAt(now) {
  return new Intl.DateTimeFormat('en-US', {
    year: 'numeric',
    month: 'long',
    day: 'numeric',
    hour: 'numeric',
    minute: '2-digit',
    timeZone: 'UTC',
    timeZoneName: 'short',
  }).format(now);
}

function main() {
  if (process.argv.includes('--help')) {
    process.stdout.write(HELP);
    return;
  }

  const args = parseArgs(process.argv);
  if (!args.output || !args.data) {
    process.stderr.write('Usage: node render-migration-report.js --output <path> --data <json-file>\n');
    process.exit(1);
  }

  let data;
  try {
    data = JSON.parse(fs.readFileSync(path.resolve(args.data), 'utf8'));
  } catch (error) {
    process.stderr.write(`Could not read data file ${args.data}: ${error.message}\n`);
    process.exit(1);
  }

  renderTemplate({
    templatePath: path.join(__dirname, '..', 'assets', 'migration-report-template.html'),
    outputPath: path.resolve(args.output),
    // Renderer owns the stamp reflecting render time.
    dataObject: { ...data, GENERATED_AT: formatGeneratedAt(new Date()) },
    requiredKeys: ['REPORT_STATUS', 'SCOPE_NOTE', 'WILDCARD_DATA', 'EXPLICIT_DATA'],
  });
}

main();
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 319kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 196kUpdated Claude CodeCodexVerifiedInstall