@wilm-ai/wilma-cli 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +16 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -354,6 +354,14 @@ async function handleCommand(args, config) {
354
354
  }
355
355
  if (command === "news") {
356
356
  if (subcommand === "read" && flags.id) {
357
+ if (!flags.student) {
358
+ const students = await getStudentsForCommand(profile, config);
359
+ if (students.length > 1) {
360
+ console.error("Multiple students found. Use --student <id> to specify which one:");
361
+ students.forEach((s) => console.error(` ${s.studentNumber} ${s.name}`));
362
+ process.exit(1);
363
+ }
364
+ }
357
365
  const studentInfo = await resolveStudentForFlags(profile, config, flags.student);
358
366
  if (!studentInfo && !profile.studentNumber) {
359
367
  await printStudentSelectionHelp(profile, config);
@@ -388,6 +396,14 @@ async function handleCommand(args, config) {
388
396
  }
389
397
  if (command === "messages") {
390
398
  if (subcommand === "read" && flags.id) {
399
+ if (!flags.student) {
400
+ const students = await getStudentsForCommand(profile, config);
401
+ if (students.length > 1) {
402
+ console.error("Multiple students found. Use --student <id> to specify which one:");
403
+ students.forEach((s) => console.error(` ${s.studentNumber} ${s.name}`));
404
+ process.exit(1);
405
+ }
406
+ }
391
407
  const studentInfo = await resolveStudentForFlags(profile, config, flags.student);
392
408
  if (!studentInfo && !profile.studentNumber) {
393
409
  await printStudentSelectionHelp(profile, config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wilm-ai/wilma-cli",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",