persona-community-5/.pnpm-store/v3/files/5f/4ab84843344841b8c17c272f9f7d1fa570f49f335704383e5f53cfd4f412981dcf672e6a00df0ae1cf19584ed59381b4b64d3acce9ddd2c6f572bdc821141b
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

24 lines
613 B
Plaintext

import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str} from "../../compile/codegen"
import N from "../../compile/names"
const error: KeywordErrorDefinition = {
message: () => str`must NOT be present in request context`,
}
const def: CodeKeywordDefinition = {
keyword: "readOnly",
schemaType: "boolean",
error,
code(cxt: KeywordCxt) {
if (cxt.schema !== true) return
const apiContext = _`(${N.this} && ${N.this}.apiContext)`
cxt.fail(_`${apiContext} === "request"`)
},
}
export default def