feat(events): a param that holds several values (MODULE_API 1.14.0) #213
Reference in New Issue
Block a user
No description provided.
Delete Branch "feat/event-param-multiple"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Core half of Rust PLAN_REDESIGNS §12.3 (D344, docs#342): one event step can give several permissions, so an action param can now hold a list.
What changes
modules/registries.js):multiple: truewith an optionalmax(1–100, default 20), on astringorintparam only. Refused on other types, on adurationparam, on a template's inputs, with a list as theexample, and asmaxwithoutmultiple. A param that doesn't saymultiplereads back with neither key, exactly as it was declared.events/spec.js): stored as a JSON array. Each item is checked as the type's literal and an empty item is refused. Duplicates are dropped, keeping the first. More thanmaxis refused with the number. A bare value counts as a list of one, andrequiredmeans at least one.events/authorize.js):cost()gets the array. The switchboard prices a list param's example as a list of one.maxis refused in words, and a new step starts with the example as its only value.name: value, with a list's values joined by commas.engagement-triggers.jsonis regenerated, and the catalog's OpenAPI response schema notes the two keys.Tests
server/test/eventParamMultiple.test.js(8) andclient/test/eventParamMultiple.test.js(8).MODULES_DIRset to an empty directory, as for #212.Module-uo proof (frozen manifest against this branch)
The Module-uo
main@ 6246383 run against this branch:frozenManifest --check: routes.manifest.json is current — 76 routes, all documented.Module-uo declares
^1.10.0and has nomultipleparam, so nothing it registers changes.Next: Module-Rust's
rust.perm.lend/rust.perm.give(onedge,coreApi ^1.14.0) is pinned to this branch head until this merges. Then I re-pin it to the merge sha. The docs half is a separate docs PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY