Fix contentService counting and add find-by scripts #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Arc XP team, initially a bug fix for the content sources issue that I previously mentioned.
Plus additional improvements and some new scripts that I thought would be helpful. I had to make some assumptions about the database schema column values. Let me know if you have any questions, about my intentions.
Breaking changes
all-content-sources-usage.shto newall-content-sources-resolvers.shfile. Both scripts now support CSV output.New features
find-features-by-content-source.shto find features that use a specific content source (with like search). Supports CSV output.find-resolvers-by-content-source.shto find resolvers that use a specific content source (with exact match). Supports CSV output.view-page-or-template.shto dump the view to a file for debugging. Supports CSV output.view-rendering.shto dump the view to a file for debugging. Supports CSV output.view-resolver.shto dump the view to a file for debugging. Supports CSV output._debugfiles and*.csvto.gitignore. For temporary debugging files and saving CSV output files.Improvements
_duckdb-views.sqlto pass down the feature/chainfingerprintcolumn value, to help developer's easier identify the desired block in PB Editor view.describe-page-or-template.shto order bychainNameorfeatureNamecolumn, instead ofcountOfTimesUsedcolumn. This should help a dev scan the items for specific blocks more quickly.all-page-urls.shto addpublished(version Id) column, order byuricolumn, and correct script help output.find-pages-by-chain-name.shto order by 3 column values, instead of none.find-pages-by-feature-name.shto order by 3 column values, instead of none.find-pages-by-uri.shto order by 3 column values, instead of none. Correct script help output.README.mdandhelp.shwith new terminal commands.Bug fixes
_duckdb-views.sqlto moveview_resolverprocessing to top of file, and convert two columns to integers. Not a bug, just reorganizing the file, since I also move the next view._duckdb-views.sqlto moveview_page_and_templateprocessing to top of file. Used by the following view, so it needs to be declared above it, as it's used to help solve the primary bug._duckdb-views.sqltoview_renderingto remove unwanted rendering items when converting.PublishedLayoutItems: Only include rendering items from published versions, according to theview_page_and_templateview.LatestLayoutItems: Only include the latest rendering, by creation date, for each page's published version.unnest()certain column values, by only un-nesting a single level. To avoidvariantsproperty un-nesting found in features. Which I assume we can safely ignore. Correct me, if that's wrong.customFieldsforcontentServicekey. The value saved is a delimited, e.g. "content-service-1|another-service-2|other-service-3". Since feature blocks can have multiple content sources configured via their customFields.