feat: add Section library deploy script - #1293
Merged
Merged
Conversation
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
benlife5
added a commit
that referenced
this pull request
Aug 27, 2026
1. Adds a cli binary `yextve` - Will reconcile with @sas5580's cli in #1293 - See `src/cli` 2. Adds a cli command `validate` - has `--yextCI flag` for skipping API validation - also has individual flags for skipping different parts of validation - See `src/cli/commands/validate` 3. Adds validation scritps - stage 1: metadata - checks the library.json is ready to be uploaded to the API - stage 2: structure - checks that the repo structure, layout jsons, and component frontmatter are valid - This was largely copied from Brian's previous CRs - stage 3: code checks - XSS checks - bans `node:` imports - import denylist (per team discussion) - see `src/internal/sectionLibraryValidation` 4. Various other clean up - adds comments to some types - moves a file of types into the `types` dir - moves shared validation out of the vite plugin Example validation failure: ```bash $ npm run validate > pages-visual-editor-starter@0.0.0 validate > yextve validate Library metadata: failed (2 errors) src/library/library.json: id must be at most 64 characters and may contain only letters, numbers, underscores, and hyphens. src/library/library.json: schemaVersion must equal 1. Repository structure: failed (3 errors) src/library/layouts/yext-bar-social-dining/defaultLayout.json: Layout yext-bar-social-dining references missing or incompatible section YextBarSocialDiningMapSection src/library/sections/YextBarSocialDiningMapSection.tsx: src/library/sections/YextBarSocialDiningMapSection.tsx config must define a valid id. Accepted form: export const config: SectionConfig = { ... }; src/library/sections/invalid-dir: Section directories are not supported. Code checks: failed (3 errors) src/library/sections/YextBarSocialDiningBreadcrumbsSection.tsx:3:21: Package 'express' is not permitted in Section Library code. src/library/sections/YextBarSocialDiningFaqSection.tsx:29:26: Node built-in module 'node:fs' cannot run in Section Library browser code. src/library/sections/YextBarSocialDiningFaqSection.tsx:735:18: dangerouslySetInnerHTML is not permitted in Section Library code. Validation failed. 8 errors. ``` Example validation success: ```bash $ npm run validate > pages-visual-editor-starter@0.0.0 validate > yextve validate Library metadata: passed Repository structure: passed Code checks: passed Validation passed. 0 errors. ``` --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
asanehisa
reviewed
Aug 27, 2026
benlife5
reviewed
Aug 27, 2026
benlife5
left a comment
Contributor
There was a problem hiding this comment.
LGTM
Can you merge this into section-library? There's already a cli there, but feel free to overwrite that with your cli setup and register the yextve validate command. Sorry for the overlapping work
sas5580
force-pushed
the
section-library-deploy-script
branch
from
August 28, 2026 16:16
71c2021 to
17a255d
Compare
sas5580
changed the base branch from
2026-custom-components-templates
to
section-library
August 28, 2026 16:18
Author
|
Rebased onto |
asanehisa
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add
yextve deployscript. It helps create Section Libraries and Section Library Revisions via the Section Library API.Some features of this tool:
idinlibrary/library.jsonif it doesn't already exist.yextrcfile so future deploys are simple