@hart365/pp-md-pptb-edition 0.0.0-stage → 1.1.3

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mike Hartley
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,221 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # PP-MD Power Platform Markdown Document Generator
2
+
3
+ PP-MD generates structured Markdown documentation for Microsoft Power Platform solutions in two modes:
4
+
5
+ - Local Solutions mode (upload one or more solution ZIP files)
6
+ - Dataverse Connected mode (read solution metadata directly from the active Power Platform ToolBox environment)
7
+
8
+ ## Tool Features And Capabilities
9
+
10
+ ### Input and solution scope
11
+
12
+ - Process one or more exported Power Platform solution ZIP files entirely in the local tool runtime.
13
+ - Browse, search, sort, filter, refresh, and multi-select solutions from the active Power Platform ToolBox Dataverse connection.
14
+ - Filter connected solutions by publisher and managed or unmanaged status.
15
+ - Keep connected collection read-only and scoped to the selected solution components through `solutioncomponent` records.
16
+ - Choose between solution-only collection, bounded direct-reference enrichment, and a separately labelled environment appendix.
17
+ - Treat unavailable optional modern-artifact endpoints as capability gaps without failing the rest of the document.
18
+
19
+ ### Documentation coverage
20
+
21
+ - Tables, columns, requiredness, data types, keys, ownership, choices, relationships, cascade rules, Advanced Find, and field-security metadata.
22
+ - Forms, views, workflows, cloud flows, business process flows, business rules, actions, custom APIs, desktop flows, and dataflows.
23
+ - Model-driven apps, canvas apps, custom pages, code apps, app navigation, Copilot Studio agents, and AI models.
24
+ - Security roles, privilege depths, field-security profiles, plug-in assemblies, plug-in types, SDK message processing steps, reports, dashboards, and web resources.
25
+ - Connection references, environment variables, SharePoint references, offline profiles, component dependencies, and Dataverse enrichment indicators.
26
+ - Individual solution documents plus a complete **All Selected Solutions** document generated from the same normalized model.
27
+ - Mermaid ERDs and architecture diagrams, with companion diagram documents for consolidated or structurally complex output.
28
+
29
+ ### Generation, viewing, and configuration
30
+
31
+ - Configure document context, section scope, table metadata columns, security-role filters, diagram detail, diagram colour theme, and dependency reports.
32
+ - Save reusable configuration presets through ToolBox settings with a local-development fallback.
33
+ - View sanitised GitHub Flavored Markdown as rendered content or raw source.
34
+ - Import existing Markdown, search within rendered documents, copy Markdown, and follow generated table-of-contents and Back to Top links.
35
+ - Keep document controls visible above the independently scrolling viewer and adapt toolbar actions into responsive groups on narrow screens.
36
+ - Render Mermaid diagrams lazily, cache completed SVG output, and force outstanding diagrams to finish before PDF generation.
37
+ - Yield during large PDF drawing operations so status updates can paint and the interface remains responsive where possible.
38
+
39
+ ### Export capabilities
40
+
41
+ - Export the active document as Markdown, standalone sanitised HTML, searchable text-based PDF, or a styled Excel workbook.
42
+ - Embed rendered Mermaid diagrams in PDF output and fall back to readable diagram source when an image is unavailable.
43
+ - Preserve PDF pagination, headings, paragraphs, lists, tables, code blocks, links, and font-safe replacements for unsupported symbols.
44
+ - Export all Markdown documents, companion diagrams, and optional dependency reports in a ZIP archive.
45
+ - Export documents by category with organized folders for individual and consolidated output.
46
+ - Use the PPTB file-system bridge in the host and browser downloads during local development, with visible progress retained through the Save-dialog handoff.
47
+
48
+ ### Security and privacy
49
+
50
+ - Keep local ZIP processing on the user's device and connected collection within the active ToolBox connection context.
51
+ - Never query or render credentials, secure plug-in configuration, or live environment-variable values.
52
+ - Report only whether an environment-variable current-value record exists.
53
+ - Sanitise rendered Markdown and restrict generated HTML classes before display or HTML export.
54
+ - Strip raw HTML tags from PDF table-cell text, including tags with quoted `>` characters in attributes.
55
+ - Limit Dataverse Deep Insights and dependency output to meaningful references within the selected solution inventory.
56
+
57
+ ## Power Platform ToolBox Manifest Alignment
58
+
59
+ This README is aligned to metadata in package.json used by Power Platform ToolBox.
60
+
61
+ | Manifest Field | Value |
62
+ | --- | --- |
63
+ | name | @hart365/pp-md-pptb-edition |
64
+ | displayName | PP-MD Power Platform Markdown Document Generator |
65
+ | version | 1.1.3 |
66
+ | description | Generate structured Markdown documentation from Solution ZIP files or a direct Dataverse connection |
67
+ | icon | icons/pp-md.svg |
68
+ | configurations.repository | https://github.com/Hart365/pp-md-pptb-edition |
69
+ | configurations.readmeUrl | https://raw.githubusercontent.com/Hart365/pp-md-pptb-edition/refs/heads/main/README.md |
70
+ | configurations.website | https://github.com/Hart365/pp-md-pptb-edition |
71
+ | features.connectionRequirement | optional |
72
+ | license | MIT |
73
+
74
+ ## User Guide
75
+
76
+ ### Local Solutions
77
+
78
+ 1. Choose **Local Solutions**.
79
+ 2. Drop one or more exported `.zip` solution files or use the file picker.
80
+ 3. Review the generated documents in the sidebar.
81
+ 4. Adjust document context, metadata columns, security filters, diagram settings, and section scope before regenerating.
82
+
83
+ ### Dataverse Connected
84
+
85
+ 1. Choose **Dataverse Connected** inside PPTB.
86
+ 2. Confirm an active Dataverse connection.
87
+ 3. Search, sort, filter, and select one or more solutions.
88
+ 4. Choose the collection policy when additional bounded context is needed.
89
+ 5. Generate and review the solution-scoped documentation.
90
+
91
+ ### Viewer controls
92
+
93
+ The viewer supports rendered Markdown, raw Markdown, in-document search, copy, internal heading navigation, Mermaid diagrams, companion diagram documents, and responsive export menus. The **All Selected Solutions** entry is a full consolidated document, not just a summary.
94
+
95
+ ## Export Formats
96
+
97
+ - **Markdown**: the active document as `.md`.
98
+ - **HTML**: sanitized rendered content as a standalone `.html` file.
99
+ - **PDF**: a valid generated `.pdf` file with headings, tables represented as readable text, pagination, and safe font-compatible text.
100
+ - **Excel**: a styled `.xlsx` workbook with Overview, Tables, Columns, Relationships, Processes, Apps, Integration, Security, and Automation sheets.
101
+ - **All Markdown**: a ZIP containing generated documents, companion diagrams, and optional dependency reports.
102
+ - **By Category**: a ZIP containing category folders for individual solutions and the consolidated document.
103
+
104
+ ## Accessibility
105
+
106
+ This tool has been designed to meet WCAG 2.2 AA compliance where possbile. This includes:
107
+
108
+ - Semantic landmarks, headings, lists, tables, labels, grouped controls, and status regions.
109
+ - Keyboard-operable native controls for file selection, filtering, toggles, disclosure menus, search, export, and navigation.
110
+ - A skip link, logical focus order, visible `:focus-visible` indicators, and controls that remain usable without pointer input.
111
+ - Programmatically announced processing, validation, copy, export, PDF preparation, and diagram-rendering status.
112
+ - Meaningful visible text alongside colour-coded privilege, permission, warning, success, and error states.
113
+ - Accessible Mermaid figure captions, SVG labels, text descriptions, source disclosure, and failure fallbacks.
114
+ - Sanitized Markdown with preserved semantic table structure and horizontally scrollable table regions where required.
115
+ - Light and dark themes with automated token contrast checks, native-control colour-scheme support, and consistent toolbar font metrics.
116
+ - Reduced-motion behavior, stable target sizes, responsive reflow, non-overlapping toolbar groups, and narrow-screen navigation.
117
+ - Search and viewer state exposed through native roles, names, values, and pressed or busy states.
118
+
119
+ The standard validation pipeline checks structure, theme-token contrast, TypeScript, lint, unit behavior, offline package requirements, and the production build. Testing for Screen-reader combinations, forced colours, 400% zoom, and final PPTB iframe behavior requires manual testing, which has been carried out to best-endeavours.
120
+
121
+ The author does not claim complete WCAG conformance and individual testing should be performed. If accessibility issues are discovered then please log these as issues in GitHub for review and resolution where possible.
122
+
123
+ ## Architecture At A Glance
124
+
125
+ ```text
126
+ ZIP files --------------------> solutionParser.ts ----\
127
+ > ParsedSolution
128
+ PPTB Dataverse connection ----> solutionService.ts --/ |
129
+ v
130
+ markdownGenerator.ts
131
+ |
132
+ MarkdownViewer + export adapters
133
+ ```
134
+
135
+ The detailed file and responsibility map is maintained in [docs/codebase-guide.md](docs/codebase-guide.md). The research-backed parity analysis and implementation history are maintained in [docs/pp-md-feature-parity-plan.md](docs/pp-md-feature-parity-plan.md). The summary above is the authoritative description of currently shipped features.
136
+
137
+ ## How To Use In Power Platform ToolBox
138
+
139
+ 1. Open PP-MD in Power Platform ToolBox.
140
+ 2. Choose a launch mode:
141
+ - Local Solutions for ZIP upload
142
+ - Dataverse Connected for direct environment reads
143
+ 3. Optionally set document header fields (client, contract, project, sprint, release date).
144
+ 4. Generate documentation.
145
+ 5. Review in the built-in Markdown viewer.
146
+ 6. Export single files, all files, and include dependency reports.
147
+
148
+ ## Dataverse Connected Mode Workflow
149
+
150
+ 1. Ensure an active Dataverse connection exists in ToolBox.
151
+ 2. Select Dataverse Connected mode.
152
+ 3. Load and filter available solutions.
153
+ 4. Select one or more solutions.
154
+ 5. Generate selected documentation.
155
+ 6. Export Markdown output.
156
+
157
+ ## Local Solutions Mode Workflow
158
+
159
+ 1. Select Local Solutions mode.
160
+ 2. Drag and drop solution ZIP files, or browse to select files.
161
+ 3. Generate documentation for each valid solution archive.
162
+ 4. Review and export individual or combined output.
163
+
164
+ ## Development
165
+
166
+ Prerequisites:
167
+
168
+ - Node.js 20+
169
+ - npm
170
+
171
+ Commands:
172
+
173
+ - Install dependencies: npm.cmd install
174
+ - Run dev server: npm.cmd run dev
175
+ - Lint: npm.cmd run lint
176
+ - Type check: npm.cmd run type-check
177
+ - Unit tests: npm.cmd run test:unit
178
+ - Build: npm.cmd run build
179
+ - Full pipeline: npm.cmd run test
180
+ - Contrast audit: npm.cmd run test:contrast
181
+ - Official PPTB validation with URL checks: npm.cmd run validate
182
+ - Deterministic PPTB validation without URL checks: npm.cmd run validate:offline
183
+ - Validate built entry point and icon: npm.cmd run validate:dist
184
+ - Complete publishing preflight: npm.cmd run finalize-package
185
+
186
+ ### PPTB publishing preflight
187
+
188
+ 1. Run `npm.cmd ci` and `npm.cmd run finalize-package`.
189
+ 2. Run `npm.cmd run validate` with network access and resolve every validator error or warning.
190
+ 3. Load the built tool through Power Platform ToolBox **Debug > Load Local Tool** and test both launch modes and exports.
191
+ 4. Authenticate with npm using `npm login`, then confirm the account can publish the `@hart365` scope.
192
+ 5. Publish the scoped package with `npm publish --access public`.
193
+ 6. Install `@hart365/pp-md-pptb-edition` through PPTB **Debug > Install from npm** and complete a published-package smoke test.
194
+ 7. Submit the npm package through the Power Platform ToolBox tool-submission form.
195
+
196
+ The package intentionally declares `api.github.com` as an optional CSP connection used only for update checks. Core documentation generation remains available when that endpoint is unavailable.
197
+
198
+ ## Security And Privacy
199
+
200
+ - Processing is local to the tool runtime.
201
+ - Dataverse Connected mode performs read-only metadata access.
202
+ - Generated documentation stays under user control.
203
+ - Credentials are not written into generated Markdown output.
204
+ - Connected environment-variable values are not queried for documentation; only whether a value record exists is reported.
205
+ - PDF and Excel exports are generated locally from the normalized solution model.
206
+
207
+ ## Troubleshooting
208
+
209
+ - **Optional connected artifact warnings**: some Dataverse environments do not expose every modern-artifact endpoint. Those capabilities are treated as unavailable and do not prevent the rest of the solution from being documented.
210
+ - **Large documents**: Mermaid diagrams are automatically moved to a companion document when the generated document is large or structurally complex.
211
+ - **PPTB downloads**: exports use the ToolBox file-system bridge inside PPTB and browser downloads during local development.
212
+
213
+ ## Support
214
+
215
+ - Repository: https://github.com/Hart365/pp-md-pptb-edition
216
+ - Issues: https://github.com/Hart365/pp-md-pptb-edition/issues
217
+ - Website: https://github.com/Hart365/pp-md-pptb-edition
218
+
219
+ ## License
220
+
221
+ MIT