fix(contracts): advertise NUL with a portable hex escape
Use the equivalent hex NUL spelling in named public contracts while preserving current path and reserved-name validation. Verify converted JSON Schema and real stdio catalog consumers. Closes #1329 Co-authored-by: Yi-111-a <97448247+Yi-111-a@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,7 @@ const hexSchema = z.string().regex(/^0x[0-9a-f]+$/u);
|
||||
const nativeString = z
|
||||
.string()
|
||||
.regex(
|
||||
/^[^\u0000]*$/u,
|
||||
/^[^\x00]*$/u,
|
||||
"Native launch and breakpoint strings cannot contain NUL",
|
||||
);
|
||||
/** Objective-C class names and selectors never contain spaces or brackets. */
|
||||
@@ -61,10 +61,8 @@ export const nativeCallObservationInputSchema = z.strictObject({
|
||||
z
|
||||
.string()
|
||||
.min(1)
|
||||
.regex(/^[^=\u0000]+$/u, "Environment names cannot contain '=' or NUL"),
|
||||
z
|
||||
.string()
|
||||
.regex(/^[^\u0000]*$/u, "Environment values cannot contain NUL"),
|
||||
.regex(/^[^=\x00]+$/u, "Environment names cannot contain '=' or NUL"),
|
||||
z.string().regex(/^[^\x00]*$/u, "Environment values cannot contain NUL"),
|
||||
)
|
||||
.default({})
|
||||
.describe("Overrides on top of the environment REA runs with."),
|
||||
|
||||
Reference in New Issue
Block a user