import * as querystring from "querystring" ; param metadata export function setMetadata ( metadata ) { const fromEnv = process . env . PLASMIC_METADATA ? querystring . decode ( process . env . PLASMIC_METADATA ) : { } ; const env = { ... fromEnv } ; for ( const [ k , v ] of Object . entries ( metadata ) ) { if ( ! env [ k ] ) { env [ k ] = v ; } } process . env . PLASMIC_METADATA = querystring . encode ( env ) ; }