chofex-cli 0.1.181 → 0.1.186

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.
package/README.md CHANGED
@@ -46,9 +46,11 @@ actual. Usa `CHOFEX_AUTO_UPDATE=0` para desactivar esta comprobación.
46
46
  optional phone number, bio, portfolio URL, shipped project, LinkedIn and GitHub
47
47
  URLs, and Terms and Conditions. Use `--input` to submit a completed JSON
48
48
  application.
49
- After attendance confirmation, `chofex badge regenerate` updates the public
50
- badge name, one-line description, picture, and QR destination without changing
51
- the submitted application.
49
+ Acceptance creates a default badge from the profile visible to reviewers.
50
+ `chofex confirm` updates its public name, one-line description, and picture
51
+ while collecting the venue details required for attendance. After confirmation,
52
+ `chofex badge regenerate` can also update those public fields and the QR
53
+ destination without changing the submitted application.
52
54
  The technical challenges do not block submission, but every challenge winner must submit
53
55
  an application before being accepted. Top results receive a direct pass; other
54
56
  scores give organizers another review metric.
package/dist/index.js CHANGED
@@ -58869,6 +58869,8 @@ var ChallengeRankingEntrySchema = exports_Schema.Struct({
58869
58869
  rank: exports_Schema.Number,
58870
58870
  displayName: exports_Schema.String,
58871
58871
  shareCode: exports_Schema.String,
58872
+ githubUrl: exports_Schema.optional(exports_Schema.String),
58873
+ linkedInUrl: exports_Schema.optional(exports_Schema.String),
58872
58874
  accuracy: exports_Schema.Number,
58873
58875
  exactCount: exports_Schema.Number,
58874
58876
  sampleSize: exports_Schema.Number,
@@ -59043,7 +59045,9 @@ var ApplicationPartId = exports_Schema.Literals([
59043
59045
  ]);
59044
59046
  var acceptedDetailsInputFields = {
59045
59047
  fullName: nonBlank(200),
59046
- phone,
59048
+ displayName: exports_Schema.optional(nonBlank(200)),
59049
+ oneLiner: exports_Schema.optional(nonBlank(30)),
59050
+ phone: exports_Schema.optional(phone),
59047
59051
  dateOfBirth: exports_Schema.String.pipe(exports_Schema.check(exports_Schema.isPattern(/^\d{4}-\d{2}-\d{2}$/, {
59048
59052
  message: "Must use YYYY-MM-DD format"
59049
59053
  }))),
@@ -60188,7 +60192,9 @@ var challengeRankingText = (ranking, now3 = new Date) => {
60188
60192
  const accuracy = percent(entry.accuracy).padStart(8, " ");
60189
60193
  const points = `${entry.exactCount}/${entry.sampleSize}`.padStart(11, " ");
60190
60194
  const runtime = `${entry.runtimeMs}ms`.padStart(8, " ");
60191
- lines2.push(`${rank} ${accuracy} ${points} ${runtime} ${entry.displayName} #${entry.shareCode}`);
60195
+ const profileLinks = [entry.githubUrl, entry.linkedInUrl].filter(Boolean);
60196
+ const participant = [entry.displayName, ...profileLinks].join(" ");
60197
+ lines2.push(`${rank} ${accuracy} ${points} ${runtime} ${participant}`);
60192
60198
  }
60193
60199
  return lines2.join(`
60194
60200
  `);
@@ -60199,7 +60205,9 @@ var challengeRankingText = (ranking, now3 = new Date) => {
60199
60205
  const accuracy = percent(entry.accuracy).padStart(8, " ");
60200
60206
  const exact = `${entry.exactCount}/${entry.sampleSize}`.padStart(11, " ");
60201
60207
  const queries = String(entry.queriesUsed).padStart(7, " ");
60202
- lines2.push(`${rank} ${accuracy} ${exact} ${queries} ${entry.displayName} #${entry.shareCode}`);
60208
+ const profileLinks = [entry.githubUrl, entry.linkedInUrl].filter(Boolean);
60209
+ const participant = [entry.displayName, ...profileLinks].join(" ");
60210
+ lines2.push(`${rank} ${accuracy} ${exact} ${queries} ${participant}`);
60203
60211
  }
60204
60212
  return lines2.join(`
60205
60213
  `);
@@ -61335,8 +61343,10 @@ var interactiveAcceptedDetails = (participationMode, pictures) => exports_Effect
61335
61343
  if (!fullName) {
61336
61344
  fullName = yield* exports_Prompt.run(requiredText("Full name exactly as it appears on your ID document", acceptedDetailsInputFields.fullName));
61337
61345
  }
61346
+ const displayName = yield* exports_Prompt.run(requiredText("Nombre impreso en tu carnet", acceptedDetailsInputFields.fullName, pictures.currentDisplayName ?? fullName));
61347
+ const oneLiner = yield* exports_Prompt.run(requiredText("Presentación de una línea para tu carnet", badgeRegenerationInputFields.oneLiner, pictures.currentOneLiner));
61338
61348
  const details = yield* exports_Prompt.run(exports_Prompt.all({
61339
- phone: requiredText("Phone number", acceptedDetailsInputFields.phone, pictures.currentPhone),
61349
+ phone: optionalText2("Teléfono para WhatsApp (opcional)", acceptedDetailsInputFields.phone, pictures.currentPhone),
61340
61350
  dateOfBirth: dateOfBirthPrompt(),
61341
61351
  nationalIdNumber: requiredText("National ID or passport number", acceptedDetailsInputFields.nationalIdNumber),
61342
61352
  shirtSize: shirtSizePrompt(participationMode),
@@ -61369,7 +61379,13 @@ var interactiveAcceptedDetails = (participationMode, pictures) => exports_Effect
61369
61379
  message: "Confirm the profile picture reviewers should use",
61370
61380
  choices: pictureChoices
61371
61381
  }));
61372
- return withoutEmptyStrings({ fullName, ...details, pictureSource });
61382
+ return withoutEmptyStrings({
61383
+ fullName,
61384
+ displayName,
61385
+ oneLiner,
61386
+ ...details,
61387
+ pictureSource
61388
+ });
61373
61389
  });
61374
61390
  var inputOrInteractive = (path4, interactive) => {
61375
61391
  if (path4)
@@ -63473,11 +63489,14 @@ var confirmCommand = exports_Command.make("confirm", {
63473
63489
  return yield* exports_Effect.fail(cliError("INVALID_APPLICATION_STATE", "Acceptance details can only be submitted after acceptance"));
63474
63490
  }
63475
63491
  const currentUser = yield* getCurrentUser(client);
63492
+ const currentBadge = yield* getBadge(client);
63476
63493
  const body = yield* acceptedDetailsInput(exports_Option.getOrUndefined(input), current.data.registration.participationMode, {
63477
63494
  clerkPictureUrl: currentUser.data.clerkPictureUrl,
63478
63495
  githubUrl: current.data.registration.githubUrl,
63479
63496
  currentPhone: current.data.registration.phone,
63480
- currentFullName: joinFullName(current.data.registration.firstName, current.data.registration.lastName) || current.data.registration.fullName
63497
+ currentDisplayName: currentBadge.data.profile?.fullName,
63498
+ currentOneLiner: currentBadge.data.profile?.oneLiner ?? current.data.registration.role,
63499
+ currentFullName: current.data.registration.fullName || joinFullName(current.data.registration.firstName, current.data.registration.lastName)
63481
63500
  });
63482
63501
  const picturePath = exports_Option.getOrUndefined(picture);
63483
63502
  if (body.pictureSource === "upload") {
@@ -63614,6 +63633,8 @@ var applicationTemplate = {
63614
63633
  };
63615
63634
  var acceptanceTemplate = {
63616
63635
  fullName: "Ada Lovelace",
63636
+ displayName: "Ada L.",
63637
+ oneLiner: "Computing pioneer",
63617
63638
  phone: "+44 20 0000 0000",
63618
63639
  dateOfBirth: "1990-01-01",
63619
63640
  nationalIdNumber: "passport-or-national-id",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chofex-cli",
3
- "version": "0.1.181",
3
+ "version": "0.1.186",
4
4
  "description": "Command-line client for Hack the Andes",
5
5
  "type": "module",
6
6
  "bin": {