A plugin marketplace for GitHub Copilot and other AI agents that provides Power Platform development plugins, including reusable skills, agents, and commands for building and deploying solutions.
JavaScript claude-code-pluginclaude-code-skillscode-appsgithub-copilot-pluginpower-appspower-pagespower-platform
[Pages][ALM] setup-pipeline: resolve dev env URL via pac env who for declarative/EDM sites (#204)
T-Nidc419336e7598
diff --git a/plugins/power-pages/skills/setup-pipeline/SKILL.md b/plugins/power-pages/skills/setup-pipeline/SKILL.mdindex c42e1b2ef..26a2559d6 100644--- a/plugins/power-pages/skills/setup-pipeline/SKILL.md+++ b/plugins/power-pages/skills/setup-pipeline/SKILL.md@@ -126,17 +126,21 @@ Steps:```bashnode "${PLUGIN_ROOT}/scripts/lib/detect-project-context.js"```- Capture output as JSON; extract `.siteName` (store as `siteName`), `.websiteRecordId`, `.environmentUrl` (store as `devEnvUrl`), and `.solutionManifest` (store as `solutionManifest`). If `siteName` is absent (no `powerpages.config.json`), stop and advise running `/power-pages:create-site` first. If `solutionManifest` is null (no `.solution-manifest.json`), stop and advise running `/power-pages:setup-solution` first.+ Capture output as JSON; extract `.siteName` (store as `siteName`), `.websiteRecordId`, `.environmentUrl` (store as `devEnvUrl`), and `.solutionManifest` (store as `solutionManifest`). **`devEnvUrl` is `null` for declarative / data-model (EDM) sites** — `detect-project-context.js` reads the env URL only from `powerpages.config.json`, which those sites don't have. Do **not** treat a null `devEnvUrl` as an error here; Step 2 resolves the authoritative dev env URL from `pac env who`. If `siteName` is absent, stop and advise running `/power-pages:create-site` first — a downloaded/deployed site (code **or** declarative) always resolves a `siteName` (from `powerpages.config.json` *or* `.powerpages-site/website.yml`), so a missing `siteName` means there is no site checked out here, **not** merely "no `powerpages.config.json`". If `solutionManifest` is null (no `.solution-manifest.json`), stop and advise running `/power-pages:setup-solution` first.**Manifest version check:**- If `solutionManifest.schemaVersion === 2` (multi-solution layout), set `MULTI_SOLUTION_MODE = true` and store `solutionManifest.solutions[]` as `SOLUTIONS_LIST`. See Phase 6b — a SINGLE pipeline ships all solutions through per-solution stage runs (the pre-v1.3.x "one pipeline per solution" layout was reverted because it cluttered the Pipelines UI).- If `schemaVersion` is absent or `1` (single solution), read `solutionManifest.solution.uniqueName` and `solutionManifest.solution.solutionId`. One pipeline will be created (existing flow).-2. Run `verify-alm-prerequisites.js` to confirm PAC CLI auth, acquire a token, and verify API access:+2. Run `verify-alm-prerequisites.js` to confirm PAC CLI auth, acquire a token, and verify API access. **Pass `--envUrl` only when `devEnvUrl` is non-null** (code sites). When `devEnvUrl` is null (declarative / data-model sites from Step 1), **omit `--envUrl` entirely** — do not pass `--envUrl "null"` or an empty value:```bash+ # Code sites — devEnvUrl resolved from powerpages.config.json in Step 1:node "${PLUGIN_ROOT}/scripts/lib/verify-alm-prerequisites.js" --envUrl "{devEnvUrl}"++ # Declarative / data-model (EDM) sites — devEnvUrl is null, omit the flag:+ node "${PLUGIN_ROOT}/scripts/lib/verify-alm-prerequisites.js"```- Capture output as JSON; extract `.envUrl` (use to confirm `devEnvUrl`) and `.token` (store as `DEV_TOKEN`).+ `verify-alm-prerequisites.js` treats `--envUrl` as optional and resolves the environment from `pac env who` when it's omitted (the flag only *overrides* the PAC CLI env). Capture output as JSON; extract `.envUrl` and `.token` (store as `DEV_TOKEN`), then **set `devEnvUrl = .envUrl`** — this verified value (from `pac env who`) is the authoritative dev env URL for every later step: it backfills the null for declarative sites and confirms it for code sites. If `.envUrl` is still empty after this, stop and advise the user to run `pac auth create` / select an environment (`pac org select`) before retrying.3. Run silently:```bash