feat(plugin): add hidden --skip-manifest-validation option to pack and upload#1480
Draft
nameless-mc wants to merge 3 commits into
Draft
feat(plugin): add hidden --skip-manifest-validation option to pack and upload#1480nameless-mc wants to merge 3 commits into
nameless-mc wants to merge 3 commits into
Conversation
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.
Why
There are cases where users need to pack or upload a plugin while temporarily bypassing manifest validation (e.g. debugging, working with a known-invalid manifest, or experimenting with manifest schema changes). Today both
plugin packandplugin uploadalways run the validator and abort on errors, with no escape hatch.What
Adds a hidden boolean flag
--skip-manifest-validation(defaultfalse, not shown in--help) to:plugin pack— skipsmanifest.validate(...)insrc/plugin/packer/pack.tsplugin upload— skips the manifest validation that runs insideContentsZip.fromBufferwhen reading the plugin zipTo support the upload path,
PluginZip.manifest()andContentsZip.fromBuffer()accept a new{ skipValidation }option. The default remainsfalse, so existing callers and existing CLI behavior are unchanged.The option is intentionally undocumented (
hidden: truein yargs) because it is meant for diagnostic use, not for general workflows.How to test
cli-kintone plugin pack/plugin uploadagainst an invalid manifest still fails with the same validation errors.cli-kintone plugin pack --skip-manifest-validation ...produces a zip without running validation, andcli-kintone plugin upload --skip-manifest-validation ...uploads a zip whose manifest would otherwise fail validation.pnpm typecheck,pnpm test,pnpm lintall pass.Checklist
pnpm lintandpnpm teston the root directory.