feat: lazy-eval pass_cmd #17

Closed
kbity wants to merge 2 commits from kbity:feature/lazy-eval-pass-cmd into main
Collaborator

closes #8 :)
adds api.platforms.AccountPassword tagged union representing two possible states:

  • pass_cmd -- password has not yet been evaluated
  • password -- plaintext password, the command has been evaluated

and integrates them into the existing api.platforms.AccountConfig struct.
evaluation takes place at Wbij.startSessionForAccount.
nb. i had to remove the const qualifier for some *config.Config.Account to allow the union to be mutated.

closes #8 :) adds `api.platforms.AccountPassword` tagged union representing two possible states: - `pass_cmd` -- password has not yet been evaluated - `password` -- plaintext password, the command has been evaluated and integrates them into the existing `api.platforms.AccountConfig` struct. evaluation takes place at `Wbij.startSessionForAccount`. nb. i had to remove the `const` qualifier for some `*config.Config.Account` to allow the union to be mutated.
kbity force-pushed feature/lazy-eval-pass-cmd from 0e2bcb3f40 to c73f30d653 2026-04-24 08:03:32 +02:00 Compare
Owner

Thank you! Good work!

Pass cmd should be evaluated at the front-end side, not api side. api module is intended to be extracted out into a separate repository and be an universal library for interacting with competitive programming platforms. Therefore, platforms.AccountConfig should be a "compiled" object that does not make any assumptions about the environment.

I will create a follow-up PR with small refactor.

Thank you! Good work! Pass cmd should be evaluated at the front-end side, not api side. `api` module is intended to be extracted out into a separate repository and be an universal library for interacting with competitive programming platforms. Therefore, `platforms.AccountConfig` should be a "compiled" object that does not make any assumptions about the environment. I will create a follow-up PR with small refactor.
maleszka closed this pull request 2026-04-24 10:26:29 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
maleszka/wbij!17
No description provided.