diff --git a/package.json b/package.json index 70b5021..c7424ff 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "clay-slip", "version": "2.0.2", - "description": "A modern Chrome extension for exploring Clay CMS pages — visualize component boundaries, inspect data, and navigate the page/layout hierarchy.", + "description": "Modern devtools for Clay CMS pages: visualize component boundaries, inspect data, and navigate the page/layout hierarchy.", "private": true, "type": "module", "license": "MIT", diff --git a/src/manifest.ts b/src/manifest.ts index 6796617..8394d2d 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -1,6 +1,16 @@ import { defineManifest } from '@crxjs/vite-plugin'; import pkg from '../package.json' with { type: 'json' }; +// Chrome Web Store rejects uploads with `manifest.description` > 132 chars. +// Catch the regression at build time, where it's easy to fix, instead of at +// upload time, where it bricks a release. +const MAX_DESCRIPTION_CHARS = 132; +if (pkg.description.length > MAX_DESCRIPTION_CHARS) { + throw new Error( + `package.json "description" is ${pkg.description.length} chars; Chrome Web Store limit is ${MAX_DESCRIPTION_CHARS}.` + ); +} + export default defineManifest({ manifest_version: 3, name: 'Clay Slip',