interactors
interactors copied to clipboard
Add `@interactors/cli`
Motivation
First step towards to bigtest v2. Changes to generate environmental agent.ts with desired interactors
Approach
Changed initialisation for matchers through using createMatcher and added abstract classes for matchers and interactors to correctly identify defined them
Added @interactors/cli with ability to generate agent.ts
TODOs and Open Questions
- [ ] Missing
okanderrfunction from manually writtenagent.ts
🦋 Changeset detected
Latest commit: c67dbfa4ec0bc2abcb54ddc0cd48936261f6b8be
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 4 packages
| Name | Type |
|---|---|
| @interactors/core | Minor |
| @interactors/keyboard | Patch |
| @interactors/html | Patch |
| @interactors/material-ui | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Deploy Preview for interactors canceled.
| Name | Link |
|---|---|
| Latest commit | c67dbfa4ec0bc2abcb54ddc0cd48936261f6b8be |
| Latest deploy log | https://app.netlify.com/sites/interactors/deploys/6697a280ed534b000824dfbe |
@wKich This is looking awesome!!!
I'm thinking that we should perhaps make only a single global property on the globalThis object. This means that among other things we're concentrated on a single place, and also, we can make a nice TypeScript interface for it. What about:
interface InteractorAgent {
run(interaction: Interaction): Result<void>;
interactors: Record<string, InteractorConstructor>;
matchers: Record<string, MatcherConstructor>;
};
The other thing I'm thinking is that the rematch() function is a little too clever. We should make every value that is processes be boxed into a type that is reified by the agent. This will mean that rematch can be made into a generic construct() that construct anything.
The next step is that we need to generate the constructors that will be used on the client side to send the data over to the agent.
I've opened a ticket #265 to have a more complete picture of what the CLI should accomplish. Let's start with the build command and we can go from there.
Package Changes Through f9ebf4661642811c1c6f1f7f2d33f8ca6ecac72c
There are 1 changes which include @interactors/core with patch
Planned Package Versions
The following package releases are the planned based on the context of changes in this pull request.
| package | current | next |
|---|---|---|
| @interactors/core | 1.0.1 | 1.0.2 |
| @interactors/keyboard | 1.0.1 | 1.0.2 |
| @interactors/html | 1.0.1 | 1.0.2 |
| @interactors/material-ui | 5.0.0 | 5.0.1 |
Add another change file through the GitHub UI by following this link.
Read about change files or the docs at github.com/jbolda/covector