chofex-cli 0.1.33 → 0.1.35

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 +21 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -58488,6 +58488,7 @@ var applicationInputFields = {
58488
58488
  var applicationInputFieldNames = Object.keys(applicationInputFields);
58489
58489
  var ApplicationInput = exports_Schema.Struct(applicationInputFields);
58490
58490
  var acceptedDetailsInputFields = {
58491
+ fullName: nonBlank(200),
58491
58492
  phone: nonBlank(32),
58492
58493
  dateOfBirth: exports_Schema.String.pipe(exports_Schema.check(exports_Schema.isPattern(/^\d{4}-\d{2}-\d{2}$/, {
58493
58494
  message: "Must use YYYY-MM-DD format"
@@ -58547,6 +58548,7 @@ var RegistrationViewSchema = exports_Schema.Struct({
58547
58548
  firstName: exports_Schema.String,
58548
58549
  lastName: exports_Schema.String,
58549
58550
  email: exports_Schema.String,
58551
+ fullName: exports_Schema.optional(exports_Schema.String),
58550
58552
  phone: exports_Schema.optional(exports_Schema.String),
58551
58553
  dateOfBirth: exports_Schema.optional(exports_Schema.String),
58552
58554
  pronouns: exports_Schema.optional(exports_Schema.String),
@@ -59396,6 +59398,21 @@ var shirtSizePrompt = (participationMode) => {
59396
59398
  });
59397
59399
  };
59398
59400
  var interactiveAcceptedDetails = (participationMode, pictures) => exports_Effect.gen(function* () {
59401
+ let fullName = pictures.currentFullName;
59402
+ if (fullName) {
59403
+ const nameChoice = yield* exports_Prompt.run(exports_Prompt.select({
59404
+ message: `Is "${fullName}" your full name exactly as it appears on your ID document?`,
59405
+ choices: [
59406
+ { title: "Yes, use this name", value: "keep" },
59407
+ { title: "No, update it", value: "update" }
59408
+ ]
59409
+ }));
59410
+ if (nameChoice === "update")
59411
+ fullName = undefined;
59412
+ }
59413
+ if (!fullName) {
59414
+ fullName = yield* exports_Prompt.run(requiredText("Full name exactly as it appears on your ID document", acceptedDetailsInputFields.fullName));
59415
+ }
59399
59416
  const details = yield* exports_Prompt.run(exports_Prompt.all({
59400
59417
  phone: requiredText("Phone number", acceptedDetailsInputFields.phone),
59401
59418
  dateOfBirth: dateOfBirthPrompt(),
@@ -59430,7 +59447,7 @@ var interactiveAcceptedDetails = (participationMode, pictures) => exports_Effect
59430
59447
  message: "Confirm the profile picture reviewers should use",
59431
59448
  choices: pictureChoices
59432
59449
  }));
59433
- return withoutEmptyStrings({ ...details, pictureSource });
59450
+ return withoutEmptyStrings({ fullName, ...details, pictureSource });
59434
59451
  });
59435
59452
  var inputOrInteractive = (path4, interactive) => {
59436
59453
  if (path4)
@@ -61295,7 +61312,8 @@ var confirmCommand = exports_Command.make("confirm", {
61295
61312
  const currentUser = yield* getCurrentUser(client);
61296
61313
  const body = yield* acceptedDetailsInput(exports_Option.getOrUndefined(input), current.data.registration.participationMode, {
61297
61314
  clerkPictureUrl: currentUser.data.clerkPictureUrl,
61298
- githubUrl: current.data.registration.githubUrl
61315
+ githubUrl: current.data.registration.githubUrl,
61316
+ currentFullName: `${current.data.registration.firstName} ${current.data.registration.lastName}`.trim()
61299
61317
  });
61300
61318
  const picturePath = exports_Option.getOrUndefined(picture);
61301
61319
  if (body.pictureSource === "upload") {
@@ -61407,6 +61425,7 @@ var applicationTemplate = {
61407
61425
  mediaConsent: false
61408
61426
  };
61409
61427
  var acceptanceTemplate = {
61428
+ fullName: "Ada Lovelace",
61410
61429
  phone: "+44 20 0000 0000",
61411
61430
  dateOfBirth: "1990-01-01",
61412
61431
  nationalIdNumber: "passport-or-national-id",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chofex-cli",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "description": "Command-line client for the Chofex Hackathon",
5
5
  "type": "module",
6
6
  "bin": {