Skip to content

feat(plugin): add hidden --skip-manifest-validation option to pack and upload#1480

Draft
nameless-mc wants to merge 3 commits into
mainfrom
feat/skip-manifest-validate
Draft

feat(plugin): add hidden --skip-manifest-validation option to pack and upload#1480
nameless-mc wants to merge 3 commits into
mainfrom
feat/skip-manifest-validate

Conversation

@nameless-mc
Copy link
Copy Markdown
Contributor

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 pack and plugin upload always run the validator and abort on errors, with no escape hatch.

What

Adds a hidden boolean flag --skip-manifest-validation (default false, not shown in --help) to:

  • plugin pack — skips manifest.validate(...) in src/plugin/packer/pack.ts
  • plugin upload — skips the manifest validation that runs inside ContentsZip.fromBuffer when reading the plugin zip

To support the upload path, PluginZip.manifest() and ContentsZip.fromBuffer() accept a new { skipValidation } option. The default remains false, so existing callers and existing CLI behavior are unchanged.

The option is intentionally undocumented (hidden: true in yargs) because it is meant for diagnostic use, not for general workflows.

How to test

  • Default behavior unchanged: cli-kintone plugin pack / plugin upload against an invalid manifest still fails with the same validation errors.
  • With the flag: cli-kintone plugin pack --skip-manifest-validation ... produces a zip without running validation, and cli-kintone plugin upload --skip-manifest-validation ... uploads a zip whose manifest would otherwise fail validation.
  • pnpm typecheck, pnpm test, pnpm lint all pass.

Checklist

  • Read CONTRIBUTING.md
  • Updated documentation if it is required. — intentionally not documented (hidden option)
  • Added/updated tests if it is required. (or tested manually) — manual; happy to add tests on request
  • Passed pnpm lint and pnpm test on the root directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant