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.
Problem
The
deviceIdRegisterEventohandler in@fireproof/core-cliaccepts aReqDeviceIdRegisterwith subject fields (country,organization,locality,state), but the default values for these fields are only defined inline in the cmd-ts option definitions incmds/device-id-cmd.js:When calling
deviceIdRegisterEvento.handle()directly (instead of shelling out tocore-cli deviceId register), callers must duplicate these defaults. The server rejects empty strings — e.g.countrymust be >= 2 chars.Request
Export a
defaultCsrSubjectconstant (or similar) from@fireproof/core-cliso direct callers can use it:Context
vibes.diy CLI switched from shelling out to
core-cli deviceId registerto callingdeviceIdRegisterEvento.handle()directly (VibesDIY/vibes.diy#1313). Had to hardcode the defaults to avoid CSR validation errors.