Skip to content

feat(SwapTokenPositions): Version 2.1.0 - Added explicit token targeting#2230

Merged
Alicekb merged 5 commits into
Roll20:masterfrom
steverobertsuk:sr/swap-token-positions-v2-1
May 21, 2026
Merged

feat(SwapTokenPositions): Version 2.1.0 - Added explicit token targeting#2230
Alicekb merged 5 commits into
Roll20:masterfrom
steverobertsuk:sr/swap-token-positions-v2-1

Conversation

@steverobertsuk
Copy link
Copy Markdown
Contributor

[2.1.0] - 2026-05-19 · Milestone

Added

  • Explicit token targeting via --token1 <id|name> and --token2 <id|name> flags.
    • Both flags must be provided together; omitting one produces a clear usage error.
    • Each input resolves by token ID first, then by token name on the active page.
    • Ambiguous name matches (multiple tokens with the same name) are rejected with guidance to use a token ID.
    • Cross-page explicit pairs are rejected the same as cross-page selection pairs.
  • parseFreeStringFlag parser utility to handle quoted (space-containing) and unquoted string values.
  • Explicit token access control via three new GM-only management commands (take effect immediately, no --save required):
    • --token-input-access <gm-only|all-players|selected-users> — sets who may use --token1 and --token2.
    • --token-input-users <id|name,...> — replaces the allow-list with the specified players (resolved by ID then display name).
    • --token-input-users-remove <id|name,...> — removes specific players from the allow-list.
    • Default mode is gm-only. The GM is always permitted regardless of mode.
    • --show-settings now includes Token Input Access and (in selected-users mode) Token Input Users.
  • parseCommaListFlag parser utility for comma-separated quoted and bare values.

Developer

  • Build process now automatically syncs package.json version from script.json on each build.
  • Build process now auto-increments the trailing build number on pre-release versions (e.g. 2.1.0.beta.02.1.0.beta.1) so the version is always up to date after each npm run build. Release versions (major.minor.patch) are not auto-incremented.
  • Versioned archive folder now uses the base semver (major.minor.patch) rather than the full pre-release string, so pre-release builds update the same folder in place.

- Added support for explicit token targeting using --token1 and --token2 flags.
- Improved error handling for token resolution and selection.
- Refactored command handling to accommodate new token input modes.
- Enhanced help documentation to include new features and examples.
- Cleaned up code formatting for consistency and readability.
- WIP: Beta version
… GMs

- Added new commands for managing token input access:
  - `--token-input-access <mode>` to set access mode (gm-only, all-players, selected-users).
  - `--token-input-users <id|name,...>` to replace the allow-list.
  - `--token-input-users-remove <id|name,...>` to remove players from the allow-list.
- Updated README and CHANGELOG to reflect new features and usage examples.
- Enhanced validation for token input settings and improved error handling for ambiguous player names.
- Updated tests to cover new access control features and ensure proper functionality.
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
@Alicekb Alicekb merged commit 01fb07f into Roll20:master May 21, 2026
1 check passed
@steverobertsuk steverobertsuk deleted the sr/swap-token-positions-v2-1 branch May 21, 2026 15:35
@steverobertsuk
Copy link
Copy Markdown
Contributor Author

@Alicekb I'm not seeing the SwapTokenPositions mod in the One-Click installer still, is there anything I need to do or provide before that can happen? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants