import {readStack} from '@sanity/blueprints/resolve'
const {values, resourcesByName} = await readStack({token: process.env.SANITY_AUTH_TOKEN})
values['production-dataset']?.['name'] // the deployed dataset's name
resourcesByName['my-function']?.externalId
When readBlueprint throws, the Stack id or scope is unknown, or the API responds with an error
Read a local blueprint and its deployed Stack
Adds each deployed resource's
externalIdandlivevalues to the declared resource with the same type and name.