SDK changelog
The six SDK packages (@plenary/core, @plenary/client, @plenary/react, @plenary/next, @plenary/nuxt, @plenary/cli) are released together under one version number. This page lists what changed in each release, newest first. Entries marked Breaking need a change on your side when you upgrade.
@plenary/client: newgraphql(query, variables?, { operationName?, tags? })runs an operation against the GraphQL API and resolves with itsdata. A declared$localevariable left unset is filled from the client’s locale. A response witherrorsrejects with the newPlenaryGraphQLError(codeandvarsfrom the first error’sextensions, plus the wholeerrorsarray and the partialdata).tagsgoes out asnext.tagson the request, sincecreateTaggedFetchpasses a GraphQL read through untagged.@plenary/cli: newgraphql <query>runs a query (inline,@file, or-) with--var name=value,--variables <json>, and--operation <name>, printingdataand anyerrorsas JSON;graphql schemaprints the site’s SDL for code generators.- Breaking (server): the one-release
GET /api/v1/content/{model_key}/entries/deletedalias is gone, and archived-entry rows no longer carrydeleted_at. Read the list at…/entries/archivedand the time fromarchived_at. - Breaking (server): the import-only
messaging.email.*andmessaging.sms.*blocks inplenary.yaml, andsecrets.aws_credentials_file, are no longer read. A file that still carries them loads, and the keys are ignored. Email and SMS bindings are configured in Global Settings; the setup wizard still stores the email binding it collects. An installation whose bindings were never seeded from the file (one that has not booted on 0.10.0 or later) should enter them in Global Settings after upgrading. @plenary/cli: Breaking.entries delete <id>no longer takes--permanent; it was the one-release guard and is now an unknown option. The command deletes permanently with or without it: check scripts that callentries deleteand switch the ones that mean archive toentries archive.
- Breaking (server): the one-release
sitesshims are gone. API key responses andGET /auth/mefor a key no longer carrysitesorsite_count; readsite_key. A key write that sendssitesin place ofsite_keyhas it ignored: a public key is refused withapi_key_sites_required, a private key becomes instance-wide (a super user’s alone).api_key_sites_multipleno longer exists. A model YAML file with asites:list is refused as an unknown key (422 metadata_invalid); writesite_key. - Server: the archived-entries list moved from
GET /api/v1/content/{model_key}/entries/deletedto…/entries/archived, and each row now carriesarchived_at. Same gate, query, and rows otherwise. The old path and the olddeleted_atfield still answer in this release and go away in the next. @plenary/cli: Breaking.entries delete <id>now deletes permanently (DELETE …?permanent=true: the entry and its revision history go, on a live or an archived entry, and cannot be restored). What it did before, archive the entry, is the newentries archive <id> [--note <text>] [-y]. For this releaseentries deleterequires--permanentand exits 2 without it, with a hint to useentries archive, so a script written against the old command fails rather than purging; the flag goes away in the next release.entries deleteno longer takes--note.@plenary/cli: newentries archived <model>lists a model’s archived entries, andentries restore <id>brings one back as a draft.
- New package
@plenary/nuxt: a Nuxt module pluscreateRevalidateHandlerfrom@plenary/nuxt/server, which turns entry webhooks into purges of Nitro’s response cache (swr/cacheroute rules anddefineCachedEventHandler) for the entry’s paths. Samesecret,paths,entryUrl, andeventsoptions as the Next.js handler; notags, since Nitro’s cache has none. @plenary/client:entryUrlandplanRevalidation(with theRevalidateOptions,RevalidatePaths, andRevalidationPlantypes) moved here from@plenary/next, which re-exports them unchanged. The client’sRevalidateOptionshas notagsand its plan has notagsarray; the@plenary/nextversions still do.@plenary/client:Entrygainsdraft— a published entry’s pending changes ({ data, slug, updated_at }) ornull, present on reads through a private key.dataandslugstay the live copy. A public key never sets it; a key with Include draft content reads the pending content indataandsluginstead.@plenary/cli:entries updateon a published entry saves pending changes instead of changing the live copy, merges--datainto the pending copy when there is one, and takes--publishto make the change live in a second call.entries publishon a published entry publishes its pending changes.@plenary/cli:entries unpublish --draft merge|discardsays what an entry with pending changes keeps when it leaves the site; without it the server refuses withentry_draft_pending.@plenary/cli: newentries discard <id>drops a published entry’s pending changes.@plenary/cli:entries listprintspublished*in the STATUS column for an entry with pending changes;getandexportcarry thedraftsubdocument.
@plenary/cli:entries import --upsertupdates the entry each line’s slug names instead of failing withentry_slug_taken, so a seed file can be imported again.@plenary/cli: newfoldersandmedia folderscommands list, get, create, and delete content and media folders by id or path, andentries create/updateandmedia uploadtake--folder-pathin place of a folder id.@plenary/cli:media upload --skip-existingskips a file whose name is already in the target folder and prints the existing asset’s id.@plenary/react:imageandfilesub-fields inside alistprop’s items are resolved like top-level media props, in published renders and in the live preview, instead of arriving as a bare{ media_id }.@plenary/next: a read of one entry (getEntry, orlistEntrieswithwhere: { slug }naming one slug) is tagged with that entry and the newplenary:model-entries:{model}tag instead of the model tag, so editing one entry no longer revalidates every entry’s page. The revalidate handler refreshesplenary:model-entries:{model}when an edit changes an entry’s slug or folder. A"use cache"function that reads one entry should tag it withmodelEntriesTag(model)andentryTag(slug).@plenary/client:where: { path: { $under: "/blog" } }now works.$underwas not recognized inside a condition object, so the query was sent as a plain value and matched nothing.@plenary/next: the defaultentryUrlrevalidates/for a root-folder entry sluggedhome, instead of/home.@plenary/cli:media uploadsends each file’s MIME type, taken from its extension, instead ofapplication/octet-stream.@plenary/cli:entries list --includeno longer fails in table mode when the included fields leave out a printed column; the column prints blank.@plenary/cli:entries liston a singleton model says to useentries get <model>instead of failing.@plenary/cli:api-keys create --site <key>reaches the server, and a public key falls back to the configured site when--siteis absent.@plenary/cli: Breaking. Inapi-keys create --grant,model=takes a model key, not a model id. It was silently ignored before, so a key created with it had no model filter: check existing keys withplenary api-keys get <id>.
@plenary/cli:media uploadsends the configured site, so uploads work on instances with more than one site.
@plenary/cli: Breaking. The CLI reads its API key fromPLENARY_CLI_API_KEY, no longer fromPLENARY_API_KEY, so a site’s own key in the environment is never picked up by the CLI by accident.@plenary/client,@plenary/next: Breaking. Webhook verification and both revalidate handlers refuse every delivery with500when the webhook secret is empty or unset, instead of accepting an empty header.@plenary/cli:metadata pull,diff, andpushwork on the configured site; pass--all-sitesfor the whole instance (roles need it).--prunestays within that site.@plenary/cli:modelsandformscommands are scoped to the configured site, since a model key is unique only within its site.@plenary/cli: Breaking.api-keys create --sitenames the one site a key belongs to and is no longer repeatable.
Releases before 1.0.0 have no changelog.