sonor-setup Changelog
7.1.2
-
The codemod moves
@sonordev/site-kit/engageimports. Engage was retired in Sonor and split in site-kit: chat imports (ChatWidget,ChatConfig, ...) move to@sonordev/site-kit/chat, popup types to@sonordev/site-kit/website/popupsunder their new names (EngageElementbecomesSitePopup, kept as the local name so nothing else in the file changes). It flagsEngageWidget, whichSiteKitLayoutalready mounts. -
Schema saves say what Sonor did.
setupandmigratesay when Sonor saved a schema as a draft because it has template placeholders (with what to fill in), or kept the copy it already had, and report a failed save as failed, including an answer that says it didn't save. They used to print a check mark either way. -
migratekeeps a page's schema until Sonor has it. It replaces a page's JSON-LD withManagedSchemaonly once Sonor has saved a copy; a refused key or a server error used to leave the page with no schema at all. JSON-LD built at render time stays as it is, and JSON-LD in a template literal that ends in a string value is read now (it never was). -
sync --schemaslists, and stops failing. It lists where each page gets its schema and points hand-written JSON-LD atmigrate. It used to send that list to an endpoint that takes one schema at a time, so the step always failed. -
The codemod puts the proxy where Next reads it. Next only runs
proxy.tsfrom the directory that holds the app: the project root, orsrc/when the app issrc/app. A proxy anywhere else is ignored without a warning and the build still passes, so the site quietly sends no security headers and runs no managed redirects. Thenext-16-proxytransform (andsonor-setup next16) used to renamemiddleware.tsin place, which leftproxy.tsat the root ofsrc/appsites. It now writessrc/proxy.tsthere and re-points the file's relative imports, and it moves a rootproxy.tsan earlier run left behind. When there's a proxy in both places, it changes neither and says which one Next runs. -
doctorchecks where the proxy is. It warns when a proxy or middleware file sits at the root of asrc/appsite (or insrc/when the app is at the root) and says where it goes, instead of calling the file present.geono longer credits the discovery header to a proxy Next never runs. A comment that mentionsruntimeno longer reads as setting one. -
Repeated reads collapse. Renaming an old fallback such as
process.env.SONOR_API_KEY || process.env.UPTRADE_API_KEYnow givesprocess.env.SONOR_API_KEY, not the same read twice, and rerunning the codemod cleans up files an earlier version left that way. In an env file it no longer renamesUPTRADE_API_KEYonto aSONOR_API_KEYthat's already set (the later line would win); it flags the old line to delete. -
Nothing extra is left in the project. The codemod,
initandmigratekeep the originals of the files they overwrite in a folder under your OS temp directory, not as.bakor.backupfiles beside them, and the codemod prints where (--no-backupskips them). A.env.local.bakalso slipped past the.env*.localignore rule older Next.js templates use. The codemod never reads or edits.env.example(or.env.sample,.env.template):.env.localis the one env file. -
The live-updates route fits a site with articles.
scaffoldwritescreateRevalidateRoute({ publicationBasePath: '/insights' })with the site's own path, read from the app directory: a dynamic page that renders site-kit articles, or a[slug]route under a folder named blog, insights, news, resources or articles. When more than one folder looks like the publication, it writes the one-line route and lists them.doctorasks for the same form, warns when a site with articles uses the one-line route, and counts a route built on agency-site-kit's handler as kit-built rather than hand-rolled. -
scaffoldwrites the proxy beside the app directory too, and won't write one next to a middleware file or a proxy Next ignores.
7.1.1
- Messages say "Sonor" where they said "Portal", the product's old name: "Uploading FAQs to Sonor", "Get your API key from Sonor → Project Settings → API Keys", and the rest. No behavior changes.
sonor-setup manifestships site-kit 7.1.2's manifest.
7.1.0
doctorchecks for the live-updates route (app/api/seo-revalidate). Without it, content edits in Sonor wait for the site's cache to expire instead of going live in seconds.scaffoldwrites that route (one line,export { POST } from '@sonordev/site-kit/revalidate') unless the site already has one.
7.0.0
First release as its own package. Until now the CLI shipped inside
@sonordev/site-kit (as its sonor-setup bin), where it was 3 MB of every
site's install and needed a site-kit release for every setup-only fix.
npx sonor-setup …works as before; npx fetches this package.- A site whose package.json scripts run
sonor-setupneeds it as a dev dependency;sonor-setup codemod --writeadds it. --jsonenvelopes reportsiteKitVersion(the site's installed site-kit,nonewhen absent) and, new,setupVersion(this CLI).manifestreads the site's installed site-kit manifest, falling back to the copy shipped here.- New codemod transform
site-kit-7: runtime imports from the site-kit root (types-only since 7.0) move to their module's entry, deprecated paths move to their 7.x homes, and a site whose scripts runsonor-setupgets it as a dev dependency. See site-kit's docs/MIGRATING-TO-7.md. - New codemod transform
next-16-proxy:middleware.ts→proxy.ts, a namedmiddlewareexport →proxy(or the default export when the file has its ownproxy), and site-kit's./middleware/createMiddleware→./proxy/createProxy. Deterministic and offline;next16uses it instead of shelling out to@next/codemod@canary. A file that setsruntimeis flagged, never moved, and nothing moves onto an existingproxy.ts. The engine can now rename files (renamedToin--json). - New command
mcp: writes a site's MCP wiring with site-kit's built-in tools (the server file, the endpoint with tool-call reporting, the server card at both well-known paths, and on Netlify the rate-limited relay plus a generatedMCP_TRANSPORT_SECRET). Never overwrites a file without--force;--inquiry-form,--booking,--offerings,--articles,--netlify/--no-netlify,--dry-run. On a site that runs its own MCP server it writes nothing and lists what's opt-in;--forcereplaces it. An existing route's extension decides route.ts vs route.js. - One
.envloader with site-kit (Next.js precedence), on Node'sutil.parseEnv;dotenvis gone. Node 20.19+. - The codemod no longer scans
.claude/(agent session worktrees).