pcf-toolkit 0.2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pcf_toolkit/__init__.py +6 -0
- pcf_toolkit/cli.py +738 -0
- pcf_toolkit/cli_helpers.py +62 -0
- pcf_toolkit/data/__init__.py +1 -0
- pcf_toolkit/data/manifest.schema.json +1097 -0
- pcf_toolkit/data/schema_snapshot.json +2377 -0
- pcf_toolkit/data/spec_raw.json +2877 -0
- pcf_toolkit/io.py +65 -0
- pcf_toolkit/json_schema.py +30 -0
- pcf_toolkit/models.py +384 -0
- pcf_toolkit/proxy/__init__.py +1 -0
- pcf_toolkit/proxy/addons/__init__.py +1 -0
- pcf_toolkit/proxy/addons/redirect_bundle.py +70 -0
- pcf_toolkit/proxy/browser.py +157 -0
- pcf_toolkit/proxy/cli.py +1570 -0
- pcf_toolkit/proxy/config.py +310 -0
- pcf_toolkit/proxy/doctor.py +279 -0
- pcf_toolkit/proxy/mitm.py +206 -0
- pcf_toolkit/proxy/server.py +50 -0
- pcf_toolkit/py.typed +1 -0
- pcf_toolkit/rich_help.py +173 -0
- pcf_toolkit/schema_snapshot.py +47 -0
- pcf_toolkit/types.py +95 -0
- pcf_toolkit/xml.py +484 -0
- pcf_toolkit/xml_import.py +548 -0
- pcf_toolkit-0.2.5.dist-info/METADATA +494 -0
- pcf_toolkit-0.2.5.dist-info/RECORD +31 -0
- pcf_toolkit-0.2.5.dist-info/WHEEL +5 -0
- pcf_toolkit-0.2.5.dist-info/entry_points.txt +2 -0
- pcf_toolkit-0.2.5.dist-info/licenses/LICENSE.md +183 -0
- pcf_toolkit-0.2.5.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pcf-toolkit
|
|
3
|
+
Version: 0.2.5
|
|
4
|
+
Summary: PCF toolkit CLI for manifest authoring and local proxy development.
|
|
5
|
+
Author-email: Vectorfy Co - Andrew M <contact@vectorfy.co>
|
|
6
|
+
License: <div align="center">
|
|
7
|
+
|
|
8
|
+
# Vectorfy Co Community Use License
|
|
9
|
+
|
|
10
|
+
### No Resale / No Hosted Service / No Embedding
|
|
11
|
+
|
|
12
|
+
**Version 1.0** — January 2026
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
> **SPDX-License-Identifier:** `LicenseRef-Vectorfy-VCUL-1.0`
|
|
19
|
+
|
|
20
|
+
<div align="center">
|
|
21
|
+
|
|
22
|
+
**Copyright (c) 2026 Vectorfy Co.**
|
|
23
|
+
*All rights reserved.*
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 1. Acceptance
|
|
32
|
+
|
|
33
|
+
> **Important:** By using, copying, modifying, or distributing the Software (defined below), you agree to all terms of this license.
|
|
34
|
+
> If you do not agree, do not use the Software.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 2. Definitions
|
|
39
|
+
|
|
40
|
+
The following terms have specific meanings in this license:
|
|
41
|
+
|
|
42
|
+
| Term | Definition |
|
|
43
|
+
|------|------------|
|
|
44
|
+
| **"Licensor"** | Vectorfy Co. |
|
|
45
|
+
| **"Software"** | The code, binaries, templates, scripts, configuration, documentation, and other materials contained in the repository or distribution that includes this license, including any portion of them. |
|
|
46
|
+
| **"You"** | The individual or legal entity exercising rights under this license. |
|
|
47
|
+
| **"Your Organization"** | You and any entity that controls, is controlled by, or is under common control with You. **"Control"** means ownership of more than 50% of the voting interests or the power to direct management. |
|
|
48
|
+
| **"Third Party"** | Anyone who is not You or part of Your Organization. |
|
|
49
|
+
| **"Distribute"** | To provide or make available the Software or a Derivative Work to any Third Party, by any means (including publishing, sharing, sublicensing, selling, hosting for download, app stores/marketplaces, or providing access over a network where the Third Party can obtain a copy). |
|
|
50
|
+
| **"Derivative Work"** | Any modified version of the Software, or any work based on or incorporating any portion of the Software (except Output, as defined below). |
|
|
51
|
+
| **"Output"** | Artifacts that You create **by using** the Software, such as generated files, compiled results, scaffolding outputs, project files, templates produced by generators, build artifacts, documentation produced by the tool, or code you write using the Software—**excluding** the Software itself and excluding any Derivative Work of the Software. |
|
|
52
|
+
| **"Commercialize"** | To sell, license for a fee, sublicense for a fee, rent, lease, monetize access to, or otherwise generate direct revenue from the Software or any Derivative Work, including as part of a paid offering. |
|
|
53
|
+
| **"Hosted/Managed Service"** | Providing the Software (or substantially similar functionality) to Third Parties as a service over a network, where those Third Parties can access or use a substantial portion of the Software's features or functionality (directly or indirectly). |
|
|
54
|
+
| **"Embedding"** | Incorporating the Software or a Derivative Work into a product or service that You provide to Third Parties (whether distributed or hosted), where the Software is used to deliver features/functionality to those Third Parties, or where the Software is bundled with that product/service. |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 3. License Grant
|
|
59
|
+
|
|
60
|
+
Subject to Your full compliance with this license, the Licensor grants You a **non-exclusive, worldwide, royalty-free license** to:
|
|
61
|
+
|
|
62
|
+
1. **Use** the Software for Your internal purposes, including production use;
|
|
63
|
+
2. **Copy** the Software as reasonably necessary for permitted use;
|
|
64
|
+
3. **Modify** the Software and create Derivative Works for permitted use; and
|
|
65
|
+
4. **Distribute** the Software and Derivative Works **only as expressly allowed** in Section 5.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 4. Permitted Uses (Production Use Allowed)
|
|
70
|
+
|
|
71
|
+
You may use the Software (including in production) for internal business operations of You and Your Organization, including:
|
|
72
|
+
|
|
73
|
+
- Development, CI/CD, internal tooling, and internal platform engineering;
|
|
74
|
+
- Building and shipping your own applications and solutions, **so long as you are not Commercializing the Software itself**.
|
|
75
|
+
|
|
76
|
+
### Professional Services (Consulting / Implementation)
|
|
77
|
+
|
|
78
|
+
You may provide professional services (e.g., consulting, integration, training) to help a Third Party use the Software **provided that**:
|
|
79
|
+
|
|
80
|
+
- You do **not** provide the Software or Derivative Works to that Third Party except by directing them to obtain it directly from the Licensor's official distribution; and
|
|
81
|
+
- You do **not** provide the Software to that Third Party as a Hosted/Managed Service; and
|
|
82
|
+
- You do **not** represent the Software as Your own product.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 5. Distribution Rules (Forks Allowed, But No Resale)
|
|
87
|
+
|
|
88
|
+
You may Distribute the Software or Derivative Works **only** if **all** of the following are true:
|
|
89
|
+
|
|
90
|
+
### 1. No Commercialization
|
|
91
|
+
You do not Commercialize the Software or any Derivative Work.
|
|
92
|
+
- You may not sell it, license it for a fee, sublicense it for a fee, or charge for access to it.
|
|
93
|
+
- You may charge **only** a reasonable amount to recover actual costs of media/shipping (if any).
|
|
94
|
+
|
|
95
|
+
### 2. No Hosted/Managed Service
|
|
96
|
+
You may not provide the Software or a Derivative Work as a Hosted/Managed Service.
|
|
97
|
+
|
|
98
|
+
### 3. No Embedding
|
|
99
|
+
You may not Embed the Software or a Derivative Work into any product or service offered to Third Parties for a fee or other commercial benefit.
|
|
100
|
+
|
|
101
|
+
### 4. Same License
|
|
102
|
+
Any Distribution must be under **this same license**, and You must provide a copy of this license with the Software/Derivative Work.
|
|
103
|
+
|
|
104
|
+
### 5. Preserve Notices
|
|
105
|
+
You must keep all copyright, license, and attribution notices intact.
|
|
106
|
+
|
|
107
|
+
### 6. Mark Changes
|
|
108
|
+
If You Distribute a Derivative Work, You must clearly and prominently state that You modified the Software and describe the nature of the changes.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 6. Explicit Prohibitions (What You May NOT Do)
|
|
113
|
+
|
|
114
|
+
> **Without a separate written commercial license from the Licensor, You may NOT:**
|
|
115
|
+
|
|
116
|
+
1. **Sell the Software** or any Derivative Work (including forks) in any form;
|
|
117
|
+
2. **Offer the Software as a service** (Hosted/Managed Service), whether paid or free;
|
|
118
|
+
3. **Embed or bundle the Software** into any commercial product/service provided to Third Parties;
|
|
119
|
+
4. **Re-license** the Software under different terms or remove this license from copies;
|
|
120
|
+
5. **Circumvent** or remove license/attribution notices.
|
|
121
|
+
|
|
122
|
+
> **Need these rights?** Contact the Licensor for a commercial license.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 7. Output Is Yours (You Can Sell What You Build)
|
|
127
|
+
|
|
128
|
+
> **This license does not restrict Output.**
|
|
129
|
+
|
|
130
|
+
You may use, modify, distribute, sublicense, and sell Output under terms of Your choice, including for commercial purposes, **provided that** You do not Distribute or Commercialize the Software itself or any Derivative Work except as allowed by this license.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 8. Trademarks
|
|
135
|
+
|
|
136
|
+
This license does not grant any rights to use the Licensor's names, trademarks, logos, or branding, except for reasonable and truthful use to identify the origin of the Software.
|
|
137
|
+
You may not state or imply endorsement by the Licensor.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## 9. Patents
|
|
142
|
+
|
|
143
|
+
To the extent the Licensor holds patent rights that are necessarily infringed by using the unmodified Software as permitted under this license, the Licensor grants You a non-exclusive, worldwide, royalty-free patent license for such permitted use.
|
|
144
|
+
|
|
145
|
+
> **Important:** If You or Your Organization assert any patent claim alleging that the Software infringes a patent, any patent license granted under this section terminates immediately.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 10. Termination and Cure
|
|
150
|
+
|
|
151
|
+
If You violate this license, Your rights under this license terminate automatically.
|
|
152
|
+
|
|
153
|
+
If the Licensor notifies You of a violation, and You fully cure the violation within **30 days** of receiving notice, Your license may be reinstated at the Licensor's discretion. Repeated or intentional violations may result in permanent termination.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## 11. Disclaimer
|
|
158
|
+
|
|
159
|
+
> **THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.**
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 12. Limitation of Liability
|
|
164
|
+
|
|
165
|
+
> **TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT WILL THE LICENSOR BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS, REVENUE, DATA, OR GOODWILL, ARISING OUT OF OR RELATED TO THE SOFTWARE OR THIS LICENSE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.**
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 13. Miscellaneous
|
|
170
|
+
|
|
171
|
+
- **Severability:** If any provision is unenforceable, the rest remains in effect.
|
|
172
|
+
- **No Waiver:** Failure to enforce any provision is not a waiver of that provision.
|
|
173
|
+
- **Entire Agreement:** This license is the entire agreement regarding the Software unless the Licensor provides a separate written agreement.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
<div align="center">
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
### Commercial Licensing
|
|
182
|
+
|
|
183
|
+
For commercial licensing inquiries (resale, SaaS, embedding), contact:
|
|
184
|
+
**contact@vectorfy.co**
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
Project-URL: homepage, https://docs.pcf-toolkit.vectorfy.co
|
|
191
|
+
Project-URL: repository, https://github.com/vectorfy-co/pcf-toolkit
|
|
192
|
+
Project-URL: issues, https://github.com/vectorfy-co/pcf-toolkit/issues
|
|
193
|
+
Keywords: pcf,power-apps,power-platform,manifest,xml,yaml,proxy,toolkit
|
|
194
|
+
Classifier: Development Status :: 4 - Beta
|
|
195
|
+
Classifier: Intended Audience :: Developers
|
|
196
|
+
Classifier: Programming Language :: Python :: 3
|
|
197
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
198
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
199
|
+
Requires-Python: >=3.13
|
|
200
|
+
Description-Content-Type: text/markdown
|
|
201
|
+
License-File: LICENSE.md
|
|
202
|
+
Requires-Dist: pydantic>=2.6
|
|
203
|
+
Requires-Dist: typer>=0.12
|
|
204
|
+
Requires-Dist: pyyaml>=6.0
|
|
205
|
+
Requires-Dist: questionary>=2.0
|
|
206
|
+
Provides-Extra: dev
|
|
207
|
+
Requires-Dist: pytest>=7.4; extra == "dev"
|
|
208
|
+
Requires-Dist: pytest-cov>=5.0; extra == "dev"
|
|
209
|
+
Requires-Dist: playwright>=1.40; extra == "dev"
|
|
210
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
211
|
+
Requires-Dist: gitpython>=3.1.46; extra == "dev"
|
|
212
|
+
Requires-Dist: pydantic-settings>=2.12.0; extra == "dev"
|
|
213
|
+
Requires-Dist: tomlkit>=0.14.0; extra == "dev"
|
|
214
|
+
Requires-Dist: rich>=14.2.0; extra == "dev"
|
|
215
|
+
Requires-Dist: packaging>=25.0; extra == "dev"
|
|
216
|
+
Provides-Extra: proxy
|
|
217
|
+
Requires-Dist: mitmproxy>=10.0; extra == "proxy"
|
|
218
|
+
Dynamic: license-file
|
|
219
|
+
|
|
220
|
+
# 
|
|
221
|
+
|
|
222
|
+
Developer-first toolkit for authoring Power Apps PCF manifests and running a local proxy that removes the publish loop.
|
|
223
|
+
|
|
224
|
+
For detailed guides, API reference, and examples, see [the documentation](https://docs.pcf-toolkit.vectorfy.co).
|
|
225
|
+
|
|
226
|
+
<div align="left">
|
|
227
|
+
<table>
|
|
228
|
+
<tr>
|
|
229
|
+
<td><strong>Lifecycle</strong></td>
|
|
230
|
+
<td>
|
|
231
|
+
<a href="https://github.com/vectorfy-co/pcf-toolkit/actions/workflows/ci.yml">
|
|
232
|
+
<img src="https://img.shields.io/github/actions/workflow/status/vectorfy-co/pcf-toolkit/ci.yml?branch=main&style=flat&logo=githubactions&logoColor=white" alt="CI status" />
|
|
233
|
+
</a>
|
|
234
|
+
<img src="https://img.shields.io/badge/Python-3.13-3776AB?style=flat&logo=python&logoColor=white" alt="Python 3.13" />
|
|
235
|
+
<img src="https://img.shields.io/github/v/release/vectorfy-co/pcf-toolkit?style=flat&logo=github&logoColor=white" alt="Latest release" />
|
|
236
|
+
<a href="./LICENSE.md">
|
|
237
|
+
<img src="https://img.shields.io/badge/License-Community%20Use-334155?style=flat&logo=spdx&logoColor=white" alt="License: Community Use" />
|
|
238
|
+
</a>
|
|
239
|
+
</td>
|
|
240
|
+
</tr>
|
|
241
|
+
<tr>
|
|
242
|
+
<td><strong>Core Stack</strong></td>
|
|
243
|
+
<td>
|
|
244
|
+
<img src="https://img.shields.io/badge/Python-CLI-3776AB?style=flat&logo=python&logoColor=white" alt="Python CLI" />
|
|
245
|
+
<img src="https://img.shields.io/badge/Pydantic-v2-E92063?style=flat&logo=pydantic&logoColor=white" alt="Pydantic" />
|
|
246
|
+
<img src="https://img.shields.io/badge/Typer-CLI-009688?style=flat&logo=fastapi&logoColor=white" alt="Typer CLI" />
|
|
247
|
+
<img src="https://img.shields.io/badge/YAML-JSON-0F172A?style=flat&logo=json&logoColor=white" alt="YAML and JSON" />
|
|
248
|
+
<img src="https://img.shields.io/badge/Proxy-mitmproxy-1F2937?style=flat&logo=serverfault&logoColor=white" alt="mitmproxy" />
|
|
249
|
+
<img src="https://img.shields.io/badge/Tests-Pytest-0A9EDC?style=flat&logo=pytest&logoColor=white" alt="Pytest" />
|
|
250
|
+
</td>
|
|
251
|
+
</tr>
|
|
252
|
+
<tr>
|
|
253
|
+
<td><strong>Navigation</strong></td>
|
|
254
|
+
<td>
|
|
255
|
+
<a href="https://docs.pcf-toolkit.vectorfy.co"><img src="https://img.shields.io/badge/Docs-Full%20Documentation-2563eb?style=flat&logo=readthedocs&logoColor=white" alt="Documentation" /></a>
|
|
256
|
+
<a href="#quick-start"><img src="https://img.shields.io/badge/Local%20Setup-Quick%20Start-059669?style=flat&logo=serverless&logoColor=white" alt="Quick start" /></a>
|
|
257
|
+
<a href="#features"><img src="https://img.shields.io/badge/Overview-Features-7c3aed?style=flat&logo=simpleicons&logoColor=white" alt="Features" /></a>
|
|
258
|
+
<a href="#configuration"><img src="https://img.shields.io/badge/Config-Proxy%20and%20Manifest-0ea5e9?style=flat&logo=zod&logoColor=white" alt="Configuration" /></a>
|
|
259
|
+
<a href="#ci-cd"><img src="https://img.shields.io/badge/Deploy-CI%2FCD-1F4B99?style=flat&logo=githubactions&logoColor=white" alt="CI/CD" /></a>
|
|
260
|
+
<a href="#architecture"><img src="https://img.shields.io/badge/Design-Architecture-1f2937?style=flat&logo=planetscale&logoColor=white" alt="Architecture" /></a>
|
|
261
|
+
<a href="#operations"><img src="https://img.shields.io/badge/Health-Operations-0F172A?style=flat&logo=serverfault&logoColor=white" alt="Operations" /></a>
|
|
262
|
+
<a href="#troubleshooting"><img src="https://img.shields.io/badge/Help-Troubleshooting-DC2626?style=flat&logo=gnubash&logoColor=white" alt="Troubleshooting" /></a>
|
|
263
|
+
</td>
|
|
264
|
+
</tr>
|
|
265
|
+
</table>
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
<a id="quick-start"></a>
|
|
269
|
+
## 
|
|
270
|
+
|
|
271
|
+
1. Install (recommended): `uv tool install pcf-toolkit@latest`
|
|
272
|
+
2. Initialize a proxy config: `pcf-toolkit proxy init`
|
|
273
|
+
3. Build your control so `out/controls/{PCF_NAME}` exists.
|
|
274
|
+
4. Start the proxy: `pcf-toolkit proxy start MyComponent`
|
|
275
|
+
|
|
276
|
+
Run without install (useful in CI or scripts):
|
|
277
|
+
```bash
|
|
278
|
+
uvx pcf-toolkit --help
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Requirements:
|
|
282
|
+
- Python 3.13
|
|
283
|
+
- `uv` (recommended for install/run)
|
|
284
|
+
- `mitmproxy` (required for proxy mode; auto-installed if `auto_install: true`)
|
|
285
|
+
- Optional: Microsoft PAC CLI (`pac`) for environment discovery
|
|
286
|
+
|
|
287
|
+
<a id="features"></a>
|
|
288
|
+
## 
|
|
289
|
+
|
|
290
|
+
| Feature Badge | Details |
|
|
291
|
+
| --- | --- |
|
|
292
|
+
|  | Intercepts PCF webresource requests and serves your local build without publishing. |
|
|
293
|
+
|  | Strict schema validation with readable errors. |
|
|
294
|
+
|  | Stable, ordered XML output for clean diffs. |
|
|
295
|
+
|  | Import legacy XML and keep authoring in YAML or JSON. |
|
|
296
|
+
|  | Export JSON Schema for editor validation and linting. |
|
|
297
|
+
|  | Diagnoses ports, mitmproxy, certs, and dist paths. |
|
|
298
|
+
|
|
299
|
+
<a id="configuration"></a>
|
|
300
|
+
## 
|
|
301
|
+
|
|
302
|
+
### Proxy config (pcf-proxy.yaml)
|
|
303
|
+
Top-level keys:
|
|
304
|
+
|
|
305
|
+
| Name | Required | Default | Format | Description |
|
|
306
|
+
| --- | --- | --- | --- | --- |
|
|
307
|
+
| project_root | no | - | path | Project root for global configs. |
|
|
308
|
+
| crm_url | no | - | URL | Power Apps environment URL (required for auto-launch). |
|
|
309
|
+
| expected_path | no | /webresources/{PCF_NAME}/ | string | Webresource path template to match. |
|
|
310
|
+
| proxy | no | - | object | Proxy endpoint settings. |
|
|
311
|
+
| http_server | no | - | object | Local HTTP server settings. |
|
|
312
|
+
| bundle | no | - | object | Build output location template. |
|
|
313
|
+
| browser | no | - | object | Browser preference and path. |
|
|
314
|
+
| mitmproxy | no | - | object | mitmproxy path override. |
|
|
315
|
+
| environments | no | - | list | Named environments from PAC. |
|
|
316
|
+
| open_browser | no | true | bool | Auto-launch browser with proxy settings. |
|
|
317
|
+
| auto_install | no | true | bool | Auto-install mitmproxy if missing. |
|
|
318
|
+
|
|
319
|
+
proxy:
|
|
320
|
+
|
|
321
|
+
| Name | Required | Default | Format | Description |
|
|
322
|
+
| --- | --- | --- | --- | --- |
|
|
323
|
+
| host | no | 127.0.0.1 | string | mitmproxy listen host. |
|
|
324
|
+
| port | no | 8080 | int | mitmproxy listen port. |
|
|
325
|
+
|
|
326
|
+
http_server:
|
|
327
|
+
|
|
328
|
+
| Name | Required | Default | Format | Description |
|
|
329
|
+
| --- | --- | --- | --- | --- |
|
|
330
|
+
| host | no | 127.0.0.1 | string | Local file server host. |
|
|
331
|
+
| port | no | 8082 | int | Local file server port. |
|
|
332
|
+
|
|
333
|
+
bundle:
|
|
334
|
+
|
|
335
|
+
| Name | Required | Default | Format | Description |
|
|
336
|
+
| --- | --- | --- | --- | --- |
|
|
337
|
+
| dist_path | no | out/controls/{PCF_NAME} | path | Build output template for the control. |
|
|
338
|
+
|
|
339
|
+
browser:
|
|
340
|
+
|
|
341
|
+
| Name | Required | Default | Format | Description |
|
|
342
|
+
| --- | --- | --- | --- | --- |
|
|
343
|
+
| prefer | no | chrome | string | Browser preference: chrome or edge. |
|
|
344
|
+
| path | no | - | path | Explicit browser binary path. |
|
|
345
|
+
|
|
346
|
+
mitmproxy:
|
|
347
|
+
|
|
348
|
+
| Name | Required | Default | Format | Description |
|
|
349
|
+
| --- | --- | --- | --- | --- |
|
|
350
|
+
| path | no | - | path | Explicit mitmproxy or mitmdump path. |
|
|
351
|
+
|
|
352
|
+
environments:
|
|
353
|
+
|
|
354
|
+
| Name | Required | Default | Format | Description |
|
|
355
|
+
| --- | --- | --- | --- | --- |
|
|
356
|
+
| name | yes | - | string | Friendly environment name. |
|
|
357
|
+
| url | yes | - | URL | Environment base URL. |
|
|
358
|
+
| active | no | false | bool | Preferred environment when multiple exist. |
|
|
359
|
+
|
|
360
|
+
### Manifest authoring
|
|
361
|
+
- Author manifests in YAML or JSON.
|
|
362
|
+
- Generate XML with `pcf-toolkit generate`.
|
|
363
|
+
- Import existing XML with `pcf-toolkit import-xml`.
|
|
364
|
+
- Validate with `pcf-toolkit validate`.
|
|
365
|
+
|
|
366
|
+
### Environment variables
|
|
367
|
+
Used internally (set automatically by the CLI):
|
|
368
|
+
|
|
369
|
+
| Name | Required | Default | Format | Description |
|
|
370
|
+
| --- | --- | --- | --- | --- |
|
|
371
|
+
| PCF_COMPONENT_NAME | yes | - | string | Component name passed to the proxy addon. |
|
|
372
|
+
| PCF_EXPECTED_PATH | no | /webresources/{PCF_NAME}/ | string | Path template used by the redirect addon. |
|
|
373
|
+
| HTTP_SERVER_HOST | no | 127.0.0.1 | string | Local HTTP server host. |
|
|
374
|
+
| HTTP_SERVER_PORT | no | 8082 | int | Local HTTP server port. |
|
|
375
|
+
|
|
376
|
+
<a id="ci-cd"></a>
|
|
377
|
+
## 
|
|
378
|
+
|
|
379
|
+
- Provider: GitHub Actions (`.github/workflows/ci.yml`).
|
|
380
|
+
- Triggers: pushes to `main`, PRs targeting `main`, and tags starting with `v`.
|
|
381
|
+
- Build steps: install uv, install Python 3.13, sync deps, build schema snapshot and JSON schema.
|
|
382
|
+
- Guardrail: `git diff --exit-code` ensures generated schema artifacts are committed.
|
|
383
|
+
- Tests: `pytest` with coverage report (terminal output only).
|
|
384
|
+
- Publish: on tags `v*`, builds and publishes to PyPI with `uv publish`.
|
|
385
|
+
|
|
386
|
+
<a id="integration"></a>
|
|
387
|
+
## 
|
|
388
|
+
|
|
389
|
+
- Optional: Microsoft PAC CLI (`pac`) for environment discovery and selection.
|
|
390
|
+
- The proxy expects your control to build into `bundle.dist_path` (defaults to `out/controls/{PCF_NAME}`).
|
|
391
|
+
- The proxy intercepts `/webresources/{PCF_NAME}/...` requests and serves files from your local build output.
|
|
392
|
+
|
|
393
|
+
<a id="auth"></a>
|
|
394
|
+
## 
|
|
395
|
+
|
|
396
|
+
- The toolkit does not manage authentication.
|
|
397
|
+
- PAC CLI uses your existing Power Platform login for environment discovery.
|
|
398
|
+
- The proxy does not store tokens or credentials; it only rewrites webresource requests.
|
|
399
|
+
|
|
400
|
+
<a id="telemetry"></a>
|
|
401
|
+
## 
|
|
402
|
+
|
|
403
|
+
- No telemetry is emitted by default.
|
|
404
|
+
- No analytics or event collection is built into the CLI.
|
|
405
|
+
|
|
406
|
+
<a id="database"></a>
|
|
407
|
+
## 
|
|
408
|
+
|
|
409
|
+
- This project does not require a database.
|
|
410
|
+
|
|
411
|
+
<a id="operations"></a>
|
|
412
|
+
## 
|
|
413
|
+
|
|
414
|
+
- Use `pcf-toolkit proxy doctor` to check ports, mitmproxy, certs, and dist paths.
|
|
415
|
+
- Active proxy sessions store PID metadata in `.pcf-toolkit/proxy.session.json`.
|
|
416
|
+
- Detached runs write logs to `.pcf-toolkit/proxy.log`.
|
|
417
|
+
|
|
418
|
+
<a id="dev-workflow"></a>
|
|
419
|
+
## 
|
|
420
|
+
|
|
421
|
+
Install dev dependencies:
|
|
422
|
+
```bash
|
|
423
|
+
uv sync --extra dev
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
Run tests:
|
|
427
|
+
```bash
|
|
428
|
+
uv run --python 3.13 pytest
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
Regenerate schema artifacts:
|
|
432
|
+
```bash
|
|
433
|
+
uv run --python 3.13 --script scripts/build_schema_snapshot.py
|
|
434
|
+
uv run --python 3.13 --script scripts/build_json_schema.py
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
If you run `scripts/extract_spec.py`, install browser binaries first:
|
|
438
|
+
```bash
|
|
439
|
+
uv run --python 3.13 python -m playwright install
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Build a wheel locally:
|
|
443
|
+
```bash
|
|
444
|
+
uv build
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
<a id="production"></a>
|
|
448
|
+
## 
|
|
449
|
+
|
|
450
|
+
- Python 3.13 available.
|
|
451
|
+
- `schemas/pcf-manifest.schema.json` and `data/schema_snapshot.json` regenerated.
|
|
452
|
+
- `pcf-toolkit proxy doctor` passes for your target component.
|
|
453
|
+
- CI pipeline is green and release tag is created for publishing.
|
|
454
|
+
|
|
455
|
+
<a id="architecture"></a>
|
|
456
|
+
## 
|
|
457
|
+
|
|
458
|
+
- CLI: Typer-based commands in `pcf_toolkit.cli` and `pcf_toolkit.proxy.cli`.
|
|
459
|
+
- Manifest tooling: Pydantic models validate YAML/JSON and serialize deterministic XML.
|
|
460
|
+
- Proxy workflow: `mitmproxy` addon rewrites PCF webresource requests to a local `http.server` instance.
|
|
461
|
+
- Schema pipeline: scripts extract and normalize Microsoft Learn references into JSON Schema and snapshots.
|
|
462
|
+
|
|
463
|
+
<a id="cli-reference"></a>
|
|
464
|
+
## 
|
|
465
|
+
|
|
466
|
+
| Command | Purpose |
|
|
467
|
+
| --- | --- |
|
|
468
|
+
| `pcf-toolkit validate <manifest>` | Validate YAML/JSON against the manifest schema. |
|
|
469
|
+
| `pcf-toolkit generate <manifest> -o ControlManifest.Input.xml` | Generate deterministic XML. |
|
|
470
|
+
| `pcf-toolkit import-xml <ControlManifest.Input.xml>` | Convert XML to YAML/JSON. |
|
|
471
|
+
| `pcf-toolkit export-json-schema -o schemas/pcf-manifest.schema.json` | Export JSON Schema. |
|
|
472
|
+
| `pcf-toolkit export-schema -o data/schema_snapshot.json` | Export schema snapshot. |
|
|
473
|
+
| `pcf-toolkit proxy init` | Create or update proxy config. |
|
|
474
|
+
| `pcf-toolkit proxy start <Component>` | Start proxy session. |
|
|
475
|
+
| `pcf-toolkit proxy stop` | Stop proxy session. |
|
|
476
|
+
| `pcf-toolkit proxy doctor` | Diagnose proxy prerequisites. |
|
|
477
|
+
|
|
478
|
+
<a id="troubleshooting"></a>
|
|
479
|
+
## 
|
|
480
|
+
|
|
481
|
+
- Manifest invalid: run `pcf-toolkit validate` and fix fields reported in the error table.
|
|
482
|
+
- Dist path missing: run your PCF build or update `bundle.dist_path` in `pcf-proxy.yaml`.
|
|
483
|
+
- Config not found: run `pcf-toolkit proxy init` or pass `--config`.
|
|
484
|
+
- mitmproxy missing: run `pcf-toolkit proxy doctor --fix` or set `mitmproxy.path`.
|
|
485
|
+
- mitmproxy CA cert missing: run `pcf-toolkit proxy doctor` and follow OS-specific guidance.
|
|
486
|
+
- Browser did not open: set `crm_url` and check `browser.prefer` or `browser.path`.
|
|
487
|
+
- Ports already in use: change `proxy.port` or `http_server.port`.
|
|
488
|
+
|
|
489
|
+
<a id="notes"></a>
|
|
490
|
+
## 
|
|
491
|
+
|
|
492
|
+
- License: `LICENSE.md` (Vectorfy Co Community Use License).
|
|
493
|
+
- No secrets are stored in the repo; use placeholders in configs.
|
|
494
|
+
- Some badges use stand-in icons (Typer uses FastAPI, Proxy uses Server Fault).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
pcf_toolkit/__init__.py,sha256=_n5QkpvmvKj4pX0tUfm2B--AH246dzgZvPbFJJ9LrHA,167
|
|
2
|
+
pcf_toolkit/cli.py,sha256=L1DYEosqPlsnAZTTc-adtVKed1K3QwHs5qS1vD1okqQ,21060
|
|
3
|
+
pcf_toolkit/cli_helpers.py,sha256=FlIYVR7e6Q3aUhTxy1jVEFbPnyWMem_Kebw8wDKKf0E,1669
|
|
4
|
+
pcf_toolkit/io.py,sha256=9RCWOd6EdV7zm5BVNaVN-297UWvfeTynC75aLzBMo-o,1554
|
|
5
|
+
pcf_toolkit/json_schema.py,sha256=XNXSh6UjUJoAPWjIVVKlvcFVZj5TLXNUN58eplYsTWc,799
|
|
6
|
+
pcf_toolkit/models.py,sha256=TqHE9n0vjD5XSG5oRfjVRLGVU-Vw_yRhWVr8845wdtE,14964
|
|
7
|
+
pcf_toolkit/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
8
|
+
pcf_toolkit/rich_help.py,sha256=gGPt9Fchh-SJdUYylialQhdjycst4Uq8CADvc2ae_Ds,5894
|
|
9
|
+
pcf_toolkit/schema_snapshot.py,sha256=xKABADBdw3zRxY31cZjeZvjBediVREEXw_Zzl6dQHMo,1317
|
|
10
|
+
pcf_toolkit/types.py,sha256=1yWmmRxuShKfaHSxKVv2lkpedvg2zx6oLOqPcLjbJgM,2121
|
|
11
|
+
pcf_toolkit/xml.py,sha256=Xc8alMLgt-l2Oec4yQjtkzY2OsPuQvyiKBjGA_nKe7w,17018
|
|
12
|
+
pcf_toolkit/xml_import.py,sha256=I3E11EUHfUT-dBeDhAZq6A_Mboa_UPj4kLuI_ugqnxo,15925
|
|
13
|
+
pcf_toolkit/data/__init__.py,sha256=oUVzqTKHPKMWFYHiaYWy4GerEgXR6ZMdkGb5d10-btM,41
|
|
14
|
+
pcf_toolkit/data/manifest.schema.json,sha256=APtxK6nD9dEMSLw30FMB4bMKGykpcsgaePmoqsXWsKQ,28146
|
|
15
|
+
pcf_toolkit/data/schema_snapshot.json,sha256=87tr3NDBF9IshguUpxkNl-rNK3jpdHA9-2lD3h3b_lU,106240
|
|
16
|
+
pcf_toolkit/data/spec_raw.json,sha256=U6WtINyuJei3LLEfTOqyee_-tUfr_3UE-hkKE4S5oDQ,112224
|
|
17
|
+
pcf_toolkit/proxy/__init__.py,sha256=ivhtZia35IJinxfZOoL2bcp7PyL0U7KxavqSp4nyDL0,37
|
|
18
|
+
pcf_toolkit/proxy/browser.py,sha256=9a-sPvnM_W0Vg2nA_uYgSRmfaej6acgtl4OekDzI9wk,4561
|
|
19
|
+
pcf_toolkit/proxy/cli.py,sha256=xIwbezSM0jgn-NZyfQNtq4MjVQz_t3FTZMAxD8eKTEI,55172
|
|
20
|
+
pcf_toolkit/proxy/config.py,sha256=-uKI96Fhc8CWKJ2Cws5yOpPzLVDd7ZeRhdvgC_hNDks,9753
|
|
21
|
+
pcf_toolkit/proxy/doctor.py,sha256=XQTvPi7z9T3i0agcYTpjrlqe8zwlsM9mC-sc9f1y36s,7977
|
|
22
|
+
pcf_toolkit/proxy/mitm.py,sha256=bKawnEqIsM8wASHfJGr1GQTeipSdHRwRrLNceXm8TTw,5624
|
|
23
|
+
pcf_toolkit/proxy/server.py,sha256=Xt6dgw5MjBDP_GiHxD5iUQTAdULkyTP7e5erVWkNbfk,1152
|
|
24
|
+
pcf_toolkit/proxy/addons/__init__.py,sha256=NI3FmO7tBhNGvy5O6r2cTgqxpmts8NVCQ4Sk2jNmlCM,32
|
|
25
|
+
pcf_toolkit/proxy/addons/redirect_bundle.py,sha256=2neGzVjbUGjw7X94Si1MGcxi2rhdkcpVTNtA9Pua4g8,2072
|
|
26
|
+
pcf_toolkit-0.2.5.dist-info/licenses/LICENSE.md,sha256=KVBxRZbs2pIY2yrA50_E8As1atJXuRw9tRAJ_vreyF4,8639
|
|
27
|
+
pcf_toolkit-0.2.5.dist-info/METADATA,sha256=d17ad-HS-2gjsCzYuIPpkygPedcdHlEcD6LeKfvBcjQ,25773
|
|
28
|
+
pcf_toolkit-0.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
pcf_toolkit-0.2.5.dist-info/entry_points.txt,sha256=ieMDIFZ1D0i8lWqoUYQAtsbU3dzIt6vxx21jtDMncNo,52
|
|
30
|
+
pcf_toolkit-0.2.5.dist-info/top_level.txt,sha256=0TURCNKgchkb-VxvC0o7jWJWJSp64d2ZVzZnRbj9GG8,12
|
|
31
|
+
pcf_toolkit-0.2.5.dist-info/RECORD,,
|