CLI reference

Functions

Improvements to the Content Release creation flow and new Functions test flag

v3.99.0

New Features and improvements

Content releases

  • When creating a new Content Release, the create release dialog will remember unsaved changes when it is minimized.
  • Creating new Content Releases is now faster, with optimizations to checks on organization quota levels.

Improved testing for Functions

The sanity functions test and sanity functions dev can now fetch a document by ID for use when testing your functions. In the dev interface, insert a valid _id , then select the "fetch document" button to populate the document as the event data source.

interface for functions dev tool with document ID input selected

In the test command, pass an _id to the --document-id flag along with a dataset to the --dataset flag.

npx sanity functions test function-name --document-id movie_123456 --dataset production