Files
Janka UrygaandGitHub 7af6e07586 feat(after): allow using unstable_after in generateStaticParams (#73217)
Allows using `unstable_after` in `generateStaticParams`. definitely
niche, but since we're now allowing `after` to be used during build, i
see no reason not to.

Also fixes an issue where we didn't pass `experimental.after` into the
context used for `generateStaticParams`, so if `after` was called, it'd
always say that you have to enable `experimental.after` even if you
already did.
2024-11-27 13:54:49 +00:00

17 lines
453 B
JavaScript

export function cliLog(/** @type {string | Record<string, any>} */ data) {
console.log('<test-log>' + JSON.stringify(data) + '</test-log>')
}
export function readCliLogs(/** @type {string} */ output) {
return output
.split('\n')
.map((line) => {
const match = line.match(/^<test-log>(?<value>.+?)<\/test-log>$/)
if (!match) {
return null
}
return JSON.parse(match.groups.value)
})
.filter(Boolean)
}