fxray

v0.1.0
io.github.S-CurveLabs/fxray Checked 3 days ago Published 2 months ago

Power Apps via pac: solutions, canvas Power Fx source, Dataverse metadata, FetchXML, gated imports.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

pac_status

Check the setup: config (allowlisted environments, writes enabled, output folder), the pac CLI version, and pac's auth profiles. Run this first when anything fails. Does not contact an environment.

whoami

Who pac is signed in as and which org it reaches for an allowlisted environment (`pac env who`). Fails with instructions if the sign-in expired. `environment` = URL or id from the allowlist (default: first).

ParameterTypeDescription
environmentstring

list_environments

All Dataverse environments the signed-in account can see (global discovery), each marked allowed / not allowed. Only allowed ones can be used by the other tools.

list_solutions

Solutions in an allowlisted environment: unique name, display name, version, managed flag, publisher. Managed (mostly Microsoft system) solutions are hidden unless include_managed=true. name_filter is a case-insensitive substring on unique or display name.

ParameterTypeDescription
environmentstring
include_managedboolean
name_filterstring

solution_components

What a solution contains. Offline (source= a solution zip or unpacked folder): manifest (name, version, managed, publisher/prefix), root components by name, canvas apps, flows, connection references, environment variables, missing dependencies. Live (solution= unique name): every component row from the environment with type and, for tables, canvas apps, flows, environment variables and connection references, the resolved name (others show the object id).

ParameterTypeDescription
environmentstring
solutionstring
sourcestring

list_canvas_apps

Canvas apps: live in an environment (`pac canvas list`: name, created by, modified on), or offline in a solution zip / unpacked folder (logical name, display name, AppVersion stamp).

ParameterTypeDescription
environmentstring
sourcestring

export_solution

Export a solution from an allowlisted environment (read-side: nothing changes in the environment) into a new timestamped folder under the output dir, and by default unpack it there (pac solution unpack) so its tables, relationships and canvas apps can be read offline. managed=true exports the managed package (only possible from the environment where the solution is unmanaged). Takes ~1 minute. Returns the zip and folder paths.

ParameterTypeDescription
solution *string
environmentstring
managedboolean
unpackboolean

unpack_solution

Unpack a solution zip (pac solution unpack, local only) into a new folder under the output dir (or <output>/unpacked/<folder_name>). Returns the folder, which works as source= for the offline tools.

ParameterTypeDescription
zip_path *string
folder_namestring

solution_check

Run the Power Apps solution checker on a solution zip (pac solution check): uploads the zip to Microsoft's checker service (a cloud call, nothing changes in the environment), waits, and summarizes the SARIF results by rule and severity. Takes several minutes. Output is kept under <output>/checks/.

ParameterTypeDescription
zip_path *string
environmentstring
geostring

diff_solutions

What changed between two versions of a solution (each a zip or unpacked folder, e.g. two export_solution outputs): version/publisher/root components, tables and columns (type, required level, length, choices), relationships, canvas apps (screens, controls, formula changes as small diffs, data sources), flows/env vars/ connection references, and changed files for anything else (views, forms).

ParameterTypeDescription
new *string
old *string
max_formula_changesinteger

canvas_overview

Summary of a canvas app's source: screens (in Studio order) with control counts, components, control types, data sources and app checker counts. source = .msapp, SourceCode folder (Src/*.pa.yaml), or a solution zip / unpacked folder (then app= logical or display name when it holds several apps).

ParameterTypeDescription
source *string
appstring

list_controls

The control tree (name, type, variant, parent, depth, number of properties), optionally for one screen and/or one control type (substring, e.g. 'Gallery', 'Button'). Use get_control for formulas.

ParameterTypeDescription
source *string
appstring
control_typestring
limitinteger
screenstring

get_control

One control (or screen, or 'App') with its type, variant, parent, children and property formulas (Power Fx). properties= limits to named properties (e.g. ['OnSelect', 'Items']).

ParameterTypeDescription
control *string
source *string
appstring
properties

search_formulas

Search every Power Fx formula in a canvas app for a substring (or regex=true). code_only=true ignores matches inside string literals and comments. property= restricts to one property name (e.g. 'OnSelect'); control= to controls whose name contains it. Returns control, property, and the matching lines.

ParameterTypeDescription
pattern *string
source *string
appstring
case_sensitiveboolean
code_onlyboolean
controlstring
limitinteger
propertystring
regexboolean

canvas_data_sources

The app's data sources (Dataverse tables, connectors, static data) with the formulas that reference each one. Flags UNREFERENCED data sources, which Power Apps Studio silently drops on the next save/publish. On a solution source it also checks meta.xml DatabaseReferences (empty = every write breaks after import) and reports columns the solution defines but the app's cached table schema lacks (invisible to the published player).

ParameterTypeDescription
source *string
appstring

app_checker_results

The App Checker results Power Apps Studio saved inside the app (AppCheckerResult.sarif): counts by level and issues grouped by rule with locations (screen.control.property). level= filters (Critical/High/Medium/Low).

ParameterTypeDescription
source *string
appstring
levelstring
limitinteger

list_tables

Dataverse tables. With source= (solution zip/folder, or canvas .msapp/SourceCode folder for the tables the app caches): name, display name, entity set, column counts. Without source: live table NAMES from the environment (the entity catalog via FetchXML; pac has no live column metadata, so describe_table needs a source). pattern = substring on logical or display name.

ParameterTypeDescription
appstring
custom_onlyboolean
environmentstring
limitinteger
patternstring
sourcestring

describe_table

Columns of one table: logical name, type, display name, required level, max length, lookup targets, choice values; plus primary id/name columns and relationships. `table` = logical, display or entity-set name. System columns (createdby, versionnumber, ...) are hidden unless include_system_columns=true. full=true adds descriptions, formats and numeric ranges. source: solution zip/folder, or a canvas app (its cached schema).

ParameterTypeDescription
source *string
table *string
appstring
fullboolean
include_system_columnsboolean

list_relationships

Table relationships from a solution (or a canvas app's cached schema): one-to-many (referenced/one side, referencing/many side and its lookup column, cascade delete) and many-to-many (intersect table). table= limits to relationships touching that table.

ParameterTypeDescription
source *string
appstring
tablestring

fetch_query

Run a read-only FetchXML query against an allowlisted environment (pac env fetch) and return rows as dicts. FetchXML cannot modify data. Rows are capped at max_rows (default from config, ceiling 5000): pac itself ignores top/count/page and would page through every record, so the server stops reading at the cap. pac also ignores <order>; the server sorts client-side when the result is complete. Values are pac's formatted strings. Prefer filters and explicit <attribute> lists; the primary key column is always appended.

ParameterTypeDescription
fetchxml *string
environmentstring
max_rowsinteger

pack_solution

Pack an unpacked solution folder into a solution zip (pac solution pack). Local only: nothing is sent to an environment. dry_run=true (default) returns the plan and command plus warnings (canvas data sources Studio would prune, empty DatabaseReferences). Default zip goes under <output>/packs/. Executing needs allow_writes=true.

ParameterTypeDescription
folder *string
dry_runboolean
overwriteboolean
package_typestring
zip_pathstring

import_solution

Import a solution zip into an ALLOWLISTED environment. dry_run=true (default) returns the plan: target org (verified with pac env who), package name/version/managed, what is installed now, whether this is a new install, an update or an upgrade, blockers and warnings (managed/unmanaged mismatch, downgrade, canvas AppVersion trap, empty DatabaseReferences), backup and the exact pac command. mode: 'update' (default; never deletes), 'upgrade' (managed only; DELETES components missing from the zip), 'holding'. Executing (dry_run=false, allow_writes=true) first exports the instal…

ParameterTypeDescription
zip_path *string
dry_runboolean
environmentstring
force_overwriteboolean
modestring
publish_changesboolean
settings_filestring

publish_customizations

Publish all customizations in an allowlisted environment (pac solution publish). dry_run=true (default) returns the verified target and command. Executing needs allow_writes=true and dry_run=false.

ParameterTypeDescription
dry_runboolean
environmentstring