Export default CSR subject fields from core-cli device-id-cmd
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, typescript
- Domain
- cli
Research direction
Start with cmds/device-id-cmd.js and the deviceIdRegisterEvento handler to trace where the four cmd-ts defaults are defined. Export a shared defaultCsrSubject from @fireproof/core-cli with the shown values, then verify direct handle() callers can use it without duplicating defaults or triggering CSR validation errors.
Written by the indexing model from the issue text.
Description
Problem
The deviceIdRegisterEvento handler in @fireproof/core-cli accepts a ReqDeviceIdRegister with subject fields (country, organization, locality, state), but the default values for these fields are only defined inline in the cmd-ts option definitions in cmds/device-id-cmd.js:
country: option({ defaultValue: () => "WD" }),
organization: option({ defaultValue: () => "You did not set the Organization" }),
locality: option({ defaultValue: () => "You did not set the City" }),
state: option({ defaultValue: () => "You did not set the State" }),
When calling deviceIdRegisterEvento.handle() directly (instead of shelling out to core-cli deviceId register), callers must duplicate these defaults. The server rejects empty strings — e.g. country must be >= 2 chars.
Request
Export a defaultCsrSubject constant (or similar) from @fireproof/core-cli so direct callers can use it:
export const defaultCsrSubject = {
country: "WD",
organization: "You did not set the Organization",
locality: "You did not set the City",
state: "You did not set the State",
};
Context
vibes.diy CLI switched from shelling out to core-cli deviceId register to calling deviceIdRegisterEvento.handle() directly (VibesDIY/vibes.diy#1313). Had to hardcode the defaults to avoid CSR validation errors.
- Dominant language
- TypeScript
- Stars
- 976
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fireproof-storage/fireproof
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fireproof-storage/fireproof#1814 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
fireproof-storage/fireproof#1812 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
fireproof-storage/fireproof#1810 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
fireproof-storage/fireproof#1649 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
fireproof-storage/fireproof#1501 ·
All issues in fireproof-storage/fireproof
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100