chofex-cli 0.1.91 → 0.1.92
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 +5 -6
- package/dist/index.js +75 -240
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,12 +24,11 @@ chofex challenge ranking
|
|
|
24
24
|
chofex confirm
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
`chofex register` saves an application draft
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
application submission.
|
|
27
|
+
`chofex register` saves an application draft with full name, role, optional
|
|
28
|
+
LinkedIn and GitHub URLs, and Terms and Conditions. Use `--input` to save a
|
|
29
|
+
JSON draft and `--submit` to submit a completed draft. The Black Box is
|
|
30
|
+
optional: its progress and score give organizers another review metric, but
|
|
31
|
+
never decide admission or block an application submission.
|
|
33
32
|
|
|
34
33
|
The public ranking is read-only at `https://andes.crafter.run/challenges`.
|
|
35
34
|
|
package/dist/index.js
CHANGED
|
@@ -58800,7 +58800,6 @@ var url = normalizedString((value3) => {
|
|
|
58800
58800
|
}).pipe(exports_Schema.check(exports_Schema.isPattern(/^https?:\/\/[^\s]+$/i, {
|
|
58801
58801
|
message: "Must be an http or https URL"
|
|
58802
58802
|
}), exports_Schema.isMaxLength(2048)));
|
|
58803
|
-
var graduationYear = exports_Schema.Int.pipe(exports_Schema.check(exports_Schema.isBetween({ minimum: 1950, maximum: 2100 })));
|
|
58804
58803
|
var RegistrationStatus = exports_Schema.Literals([
|
|
58805
58804
|
"draft",
|
|
58806
58805
|
"submitted",
|
|
@@ -58844,49 +58843,51 @@ var detectPictureContentType = (bytes) => {
|
|
|
58844
58843
|
if (isWebp)
|
|
58845
58844
|
return "image/webp";
|
|
58846
58845
|
};
|
|
58846
|
+
var givenNameMaximum = 100;
|
|
58847
|
+
var familyNameMaximum = 100;
|
|
58848
|
+
var splitFullName = (fullName) => {
|
|
58849
|
+
const normalized = fullName.trim().replace(/\s+/g, " ");
|
|
58850
|
+
const tokens = normalized.split(" ");
|
|
58851
|
+
if (tokens.length === 1) {
|
|
58852
|
+
return { firstName: normalized, lastName: "" };
|
|
58853
|
+
}
|
|
58854
|
+
for (let index2 = tokens.length - 1;index2 >= 1; index2--) {
|
|
58855
|
+
const firstName = tokens.slice(0, index2).join(" ");
|
|
58856
|
+
const lastName = tokens.slice(index2).join(" ");
|
|
58857
|
+
if (firstName.length <= givenNameMaximum && lastName.length <= familyNameMaximum) {
|
|
58858
|
+
return { firstName, lastName };
|
|
58859
|
+
}
|
|
58860
|
+
}
|
|
58861
|
+
const lastSpace = normalized.lastIndexOf(" ");
|
|
58862
|
+
return {
|
|
58863
|
+
firstName: normalized.slice(0, lastSpace),
|
|
58864
|
+
lastName: normalized.slice(lastSpace + 1)
|
|
58865
|
+
};
|
|
58866
|
+
};
|
|
58867
|
+
var joinFullName = (firstName, lastName) => {
|
|
58868
|
+
const given = firstName?.trim() ?? "";
|
|
58869
|
+
const family = lastName?.trim() ?? "";
|
|
58870
|
+
if (!family)
|
|
58871
|
+
return given;
|
|
58872
|
+
if (!given)
|
|
58873
|
+
return family;
|
|
58874
|
+
return `${given} ${family}`;
|
|
58875
|
+
};
|
|
58847
58876
|
var applicationInputFields = {
|
|
58848
|
-
|
|
58849
|
-
|
|
58850
|
-
pronouns: optionalText(50),
|
|
58851
|
-
city: nonBlank(120),
|
|
58852
|
-
organization: optionalText(200),
|
|
58853
|
-
role: optionalText(120),
|
|
58854
|
-
fieldOfStudy: optionalText(160),
|
|
58855
|
-
graduationYear: exports_Schema.optional(graduationYear),
|
|
58856
|
-
shippedProject: nonBlank(2000),
|
|
58857
|
-
hackathonProject: nonBlank(2000),
|
|
58858
|
-
bio: nonBlank(2000),
|
|
58877
|
+
fullName: nonBlank(givenNameMaximum + familyNameMaximum + 1),
|
|
58878
|
+
role: nonBlank(120),
|
|
58859
58879
|
githubUrl: exports_Schema.optional(url),
|
|
58860
58880
|
linkedInUrl: exports_Schema.optional(url),
|
|
58861
|
-
|
|
58862
|
-
teamPreference: TeamPreference,
|
|
58863
|
-
teamName: optionalText(120),
|
|
58864
|
-
codeOfConductAccepted: exports_Schema.Literal(true),
|
|
58865
|
-
privacyPolicyAccepted: exports_Schema.Literal(true),
|
|
58866
|
-
mediaConsent: exports_Schema.optional(exports_Schema.Boolean)
|
|
58881
|
+
codeOfConductAccepted: exports_Schema.Literal(true)
|
|
58867
58882
|
};
|
|
58868
58883
|
var applicationInputFieldNames = Object.keys(applicationInputFields);
|
|
58869
58884
|
var ApplicationInput = exports_Schema.Struct(applicationInputFields);
|
|
58870
58885
|
var applicationDraftInputFields = {
|
|
58871
|
-
|
|
58872
|
-
lastName: exports_Schema.optional(applicationInputFields.lastName),
|
|
58873
|
-
pronouns: nullableOptionalText(50),
|
|
58874
|
-
city: exports_Schema.optional(applicationInputFields.city),
|
|
58875
|
-
organization: nullableOptionalText(200),
|
|
58886
|
+
fullName: exports_Schema.optional(applicationInputFields.fullName),
|
|
58876
58887
|
role: nullableOptionalText(120),
|
|
58877
|
-
fieldOfStudy: nullableOptionalText(160),
|
|
58878
|
-
graduationYear: exports_Schema.optional(exports_Schema.NullOr(graduationYear)),
|
|
58879
|
-
shippedProject: exports_Schema.optional(applicationInputFields.shippedProject),
|
|
58880
|
-
hackathonProject: exports_Schema.optional(applicationInputFields.hackathonProject),
|
|
58881
|
-
bio: exports_Schema.optional(applicationInputFields.bio),
|
|
58882
58888
|
githubUrl: exports_Schema.optional(exports_Schema.NullOr(url)),
|
|
58883
58889
|
linkedInUrl: exports_Schema.optional(exports_Schema.NullOr(url)),
|
|
58884
|
-
|
|
58885
|
-
teamPreference: exports_Schema.optional(applicationInputFields.teamPreference),
|
|
58886
|
-
teamName: nullableOptionalText(120),
|
|
58887
|
-
codeOfConductAccepted: exports_Schema.optional(exports_Schema.Boolean),
|
|
58888
|
-
privacyPolicyAccepted: exports_Schema.optional(exports_Schema.Boolean),
|
|
58889
|
-
mediaConsent: exports_Schema.optional(exports_Schema.Boolean)
|
|
58890
|
+
codeOfConductAccepted: exports_Schema.optional(exports_Schema.Boolean)
|
|
58890
58891
|
};
|
|
58891
58892
|
var applicationDraftInputFieldNames = Object.keys(applicationDraftInputFields);
|
|
58892
58893
|
var ApplicationDraftInput = exports_Schema.Struct(applicationDraftInputFields);
|
|
@@ -58926,14 +58927,19 @@ var addShirtSizeRequirement = (requirements, participationMode, shirtSize) => {
|
|
|
58926
58927
|
requirements.push(inPersonShirtSizeRequirement);
|
|
58927
58928
|
}
|
|
58928
58929
|
};
|
|
58929
|
-
var
|
|
58930
|
-
|
|
58930
|
+
var fullNameColumnRequirements = (fullName) => {
|
|
58931
|
+
const { firstName, lastName } = splitFullName(fullName);
|
|
58932
|
+
if (firstName.length > givenNameMaximum || lastName.length > familyNameMaximum) {
|
|
58931
58933
|
return [
|
|
58932
|
-
{
|
|
58934
|
+
{
|
|
58935
|
+
field: "fullName",
|
|
58936
|
+
reason: "Must split into given and family names of 100 characters or fewer"
|
|
58937
|
+
}
|
|
58933
58938
|
];
|
|
58934
58939
|
}
|
|
58935
58940
|
return [];
|
|
58936
58941
|
};
|
|
58942
|
+
var applicationSemanticRequirements = (input) => fullNameColumnRequirements(input.fullName);
|
|
58937
58943
|
var dateOfBirthRequirement = (dateOfBirth) => {
|
|
58938
58944
|
const birthDate = exports_DateTime.make(`${dateOfBirth}T00:00:00.000Z`);
|
|
58939
58945
|
if (exports_Option.isNone(birthDate) || exports_DateTime.formatIsoDateUtc(birthDate.value) !== dateOfBirth || !exports_DateTime.isPastUnsafe(birthDate.value)) {
|
|
@@ -60553,27 +60559,13 @@ var profileUrlPrompt = (usernameMessage, urlMessage, profilePrefix, schema, defa
|
|
|
60553
60559
|
return `${profilePrefix}${value3}`;
|
|
60554
60560
|
}));
|
|
60555
60561
|
};
|
|
60556
|
-
var withoutEmptyStrings = (input) => Object.fromEntries(Object.entries(input).filter(([, value3]) => value3 !== "" && value3 !== undefined));
|
|
60562
|
+
var withoutEmptyStrings = (input) => Object.fromEntries(Object.entries(input).filter(([, value3]) => value3 !== "" && value3 !== undefined && value3 !== null));
|
|
60557
60563
|
var applicationDefaultsFromRegistration = (registration) => ({
|
|
60558
|
-
|
|
60559
|
-
lastName: registration.lastName,
|
|
60560
|
-
pronouns: registration.pronouns,
|
|
60561
|
-
city: registration.city,
|
|
60562
|
-
organization: registration.organization,
|
|
60564
|
+
fullName: joinFullName(registration.firstName, registration.lastName),
|
|
60563
60565
|
role: registration.role,
|
|
60564
|
-
fieldOfStudy: registration.fieldOfStudy,
|
|
60565
|
-
graduationYear: registration.graduationYear,
|
|
60566
|
-
shippedProject: registration.shippedProject,
|
|
60567
|
-
hackathonProject: registration.hackathonProject,
|
|
60568
|
-
bio: registration.bio,
|
|
60569
60566
|
githubUrl: registration.githubUrl,
|
|
60570
60567
|
linkedInUrl: registration.linkedInUrl,
|
|
60571
|
-
|
|
60572
|
-
teamPreference: registration.teamPreference,
|
|
60573
|
-
teamName: registration.teamName,
|
|
60574
|
-
codeOfConductAccepted: registration.codeOfConductAccepted ? true : undefined,
|
|
60575
|
-
privacyPolicyAccepted: registration.privacyPolicyAccepted ? true : undefined,
|
|
60576
|
-
mediaConsent: registration.mediaConsent
|
|
60568
|
+
codeOfConductAccepted: registration.codeOfConductAccepted ? true : undefined
|
|
60577
60569
|
});
|
|
60578
60570
|
var readStdin2 = async () => {
|
|
60579
60571
|
const chunks = [];
|
|
@@ -60605,51 +60597,11 @@ var validateSemantics = (input, requirements) => {
|
|
|
60605
60597
|
issues: requirements
|
|
60606
60598
|
}));
|
|
60607
60599
|
};
|
|
60608
|
-
var
|
|
60609
|
-
|
|
60610
|
-
|
|
60611
|
-
pronouns: optionalText2("Pronouns (optional)", applicationInputFields.pronouns, defaults2.pronouns),
|
|
60612
|
-
city: requiredText("City of residence in Peru", applicationInputFields.city, defaults2.city),
|
|
60613
|
-
organization: optionalText2("Organization (optional)", applicationInputFields.organization, defaults2.organization),
|
|
60614
|
-
role: optionalText2("Role (optional)", applicationInputFields.role, defaults2.role),
|
|
60615
|
-
fieldOfStudy: optionalText2("Field of study (optional)", applicationInputFields.fieldOfStudy, defaults2.fieldOfStudy),
|
|
60616
|
-
graduationYear: exports_Prompt.text({
|
|
60617
|
-
message: "Graduation year (optional)",
|
|
60618
|
-
default: defaults2.graduationYear?.toString() ?? "",
|
|
60619
|
-
validate: (value3) => {
|
|
60620
|
-
if (value3 === "")
|
|
60621
|
-
return exports_Effect.succeed(value3);
|
|
60622
|
-
return validatePromptValue(applicationInputFields.graduationYear, Number(value3)).pipe(exports_Effect.as(value3));
|
|
60623
|
-
}
|
|
60624
|
-
})
|
|
60625
|
-
});
|
|
60626
|
-
var experiencePrompts = (defaults2) => exports_Prompt.all({
|
|
60627
|
-
shippedProject: requiredText("What have you shipped?", applicationInputFields.shippedProject, defaults2.shippedProject),
|
|
60628
|
-
hackathonProject: requiredText("What do you want to ship at the hackathon?", applicationInputFields.hackathonProject, defaults2.hackathonProject),
|
|
60629
|
-
bio: requiredText("Short bio", applicationInputFields.bio, defaults2.bio),
|
|
60630
|
-
githubUrl: profileUrlPrompt("GitHub username (optional)", "GitHub URL (optional)", githubProfilePrefix, applicationInputFields.githubUrl, defaults2.githubUrl),
|
|
60600
|
+
var applicationPrompts = (defaults2) => exports_Prompt.all({
|
|
60601
|
+
fullName: requiredText("Full name", applicationInputFields.fullName, defaults2.fullName),
|
|
60602
|
+
role: requiredText("Role", applicationInputFields.role, defaults2.role),
|
|
60631
60603
|
linkedInUrl: profileUrlPrompt("LinkedIn username (optional)", "LinkedIn URL (optional)", linkedInProfilePrefix, applicationInputFields.linkedInUrl, defaults2.linkedInUrl),
|
|
60632
|
-
|
|
60633
|
-
});
|
|
60634
|
-
var teamPreferencePrompt = (defaultValue) => exports_Prompt.select({
|
|
60635
|
-
message: "Team preference",
|
|
60636
|
-
choices: [
|
|
60637
|
-
{
|
|
60638
|
-
title: "I have a team",
|
|
60639
|
-
value: "have_team",
|
|
60640
|
-
selected: defaultValue === "have_team"
|
|
60641
|
-
},
|
|
60642
|
-
{
|
|
60643
|
-
title: "I am looking for a team",
|
|
60644
|
-
value: "looking_for_team",
|
|
60645
|
-
selected: defaultValue === "looking_for_team"
|
|
60646
|
-
},
|
|
60647
|
-
{
|
|
60648
|
-
title: "I will participate solo",
|
|
60649
|
-
value: "solo",
|
|
60650
|
-
selected: defaultValue === "solo"
|
|
60651
|
-
}
|
|
60652
|
-
]
|
|
60604
|
+
githubUrl: profileUrlPrompt("GitHub username (optional)", "GitHub URL (optional)", githubProfilePrefix, applicationInputFields.githubUrl, defaults2.githubUrl)
|
|
60653
60605
|
});
|
|
60654
60606
|
var publicDocumentUrl = (baseUrl, path4) => `${baseUrl.replace(/\/$/, "")}${path4}`;
|
|
60655
60607
|
var requiredAgreement = exports_Effect.fn("requiredAgreement")(function* (name, url2, initial = false) {
|
|
@@ -60673,74 +60625,19 @@ var requiredAgreement = exports_Effect.fn("requiredAgreement")(function* (name,
|
|
|
60673
60625
|
return true;
|
|
60674
60626
|
return yield* cliError("REGISTRATION_CANCELLED", "Registration cancelled. Your answers were not submitted.");
|
|
60675
60627
|
});
|
|
60676
|
-
var normalizeDraftFields = (input) =>
|
|
60677
|
-
|
|
60678
|
-
|
|
60679
|
-
|
|
60680
|
-
|
|
60681
|
-
|
|
60682
|
-
|
|
60683
|
-
|
|
60684
|
-
var collectExperiencePart = (defaults2) => exports_Prompt.run(experiencePrompts(defaults2)).pipe(exports_Effect.map(normalizeDraftFields), exports_Effect.mapError(() => cliError("PROMPT_CANCELLED", "Interactive input was cancelled")));
|
|
60685
|
-
var collectTeamPart = (defaults2) => exports_Effect.gen(function* () {
|
|
60686
|
-
const teamPreference = yield* exports_Prompt.run(teamPreferencePrompt(defaults2.teamPreference));
|
|
60687
|
-
let teamName = null;
|
|
60688
|
-
if (teamPreference === "have_team") {
|
|
60689
|
-
teamName = yield* exports_Prompt.run(requiredText("Team name", applicationInputFields.teamName, defaults2.teamName));
|
|
60690
|
-
}
|
|
60691
|
-
return { teamPreference, teamName };
|
|
60692
|
-
}).pipe(exports_Effect.mapError((error2) => {
|
|
60693
|
-
if (error2 instanceof CliError2)
|
|
60694
|
-
return error2;
|
|
60695
|
-
return cliError("PROMPT_CANCELLED", "Interactive input was cancelled");
|
|
60696
|
-
}));
|
|
60697
|
-
var collectAgreementsPart = (publicBaseUrl, defaults2) => exports_Effect.gen(function* () {
|
|
60698
|
-
const codeOfConductAccepted = yield* requiredAgreement("Terms and Code of Conduct", publicDocumentUrl(publicBaseUrl, "/terms"), defaults2.codeOfConductAccepted);
|
|
60699
|
-
const privacyPolicyAccepted = yield* requiredAgreement("Privacy Policy", publicDocumentUrl(publicBaseUrl, "/privacy"), defaults2.privacyPolicyAccepted);
|
|
60700
|
-
const mediaConsent = yield* exports_Prompt.run(exports_Prompt.confirm({
|
|
60701
|
-
message: "Do you consent to appearing in event media? (optional)",
|
|
60702
|
-
initial: defaults2.mediaConsent ?? false
|
|
60703
|
-
}));
|
|
60704
|
-
return {
|
|
60705
|
-
codeOfConductAccepted,
|
|
60706
|
-
privacyPolicyAccepted,
|
|
60707
|
-
mediaConsent
|
|
60708
|
-
};
|
|
60628
|
+
var normalizeDraftFields = (input) => Object.fromEntries(Object.entries(input).filter(([, value3]) => value3 !== undefined).map(([key, value3]) => [key, value3 === "" ? null : value3]));
|
|
60629
|
+
var collectApplicationFields = (publicBaseUrl, defaults2) => exports_Effect.gen(function* () {
|
|
60630
|
+
const profile = yield* exports_Prompt.run(applicationPrompts(defaults2));
|
|
60631
|
+
const codeOfConductAccepted = yield* requiredAgreement("Terms and Conditions", publicDocumentUrl(publicBaseUrl, "/terms"), defaults2.codeOfConductAccepted);
|
|
60632
|
+
return normalizeDraftFields({
|
|
60633
|
+
...profile,
|
|
60634
|
+
codeOfConductAccepted
|
|
60635
|
+
});
|
|
60709
60636
|
}).pipe(exports_Effect.mapError((error2) => {
|
|
60710
60637
|
if (error2 instanceof CliError2)
|
|
60711
60638
|
return error2;
|
|
60712
60639
|
return cliError("PROMPT_CANCELLED", "Interactive input was cancelled");
|
|
60713
60640
|
}));
|
|
60714
|
-
var interactiveApplication = (publicBaseUrl, defaults2) => exports_Effect.gen(function* () {
|
|
60715
|
-
const identity3 = yield* exports_Prompt.run(identityPrompts(defaults2));
|
|
60716
|
-
const experience = yield* exports_Prompt.run(experiencePrompts(defaults2));
|
|
60717
|
-
const teamPreference = yield* exports_Prompt.run(teamPreferencePrompt(defaults2.teamPreference));
|
|
60718
|
-
let teamName;
|
|
60719
|
-
if (teamPreference === "have_team") {
|
|
60720
|
-
teamName = yield* exports_Prompt.run(requiredText("Team name", applicationInputFields.teamName, defaults2.teamName));
|
|
60721
|
-
}
|
|
60722
|
-
const codeOfConductAccepted = yield* requiredAgreement("Terms and Code of Conduct", publicDocumentUrl(publicBaseUrl, "/terms"), defaults2.codeOfConductAccepted);
|
|
60723
|
-
const privacyPolicyAccepted = yield* requiredAgreement("Privacy Policy", publicDocumentUrl(publicBaseUrl, "/privacy"), defaults2.privacyPolicyAccepted);
|
|
60724
|
-
const mediaConsent = yield* exports_Prompt.run(exports_Prompt.confirm({
|
|
60725
|
-
message: "Do you consent to appearing in event media? (optional)",
|
|
60726
|
-
initial: defaults2.mediaConsent ?? false
|
|
60727
|
-
}));
|
|
60728
|
-
return {
|
|
60729
|
-
...identity3,
|
|
60730
|
-
...experience,
|
|
60731
|
-
teamPreference,
|
|
60732
|
-
teamName,
|
|
60733
|
-
codeOfConductAccepted,
|
|
60734
|
-
privacyPolicyAccepted,
|
|
60735
|
-
mediaConsent
|
|
60736
|
-
};
|
|
60737
|
-
}).pipe(exports_Effect.map((input) => {
|
|
60738
|
-
const normalized = withoutEmptyStrings(input);
|
|
60739
|
-
if (input.graduationYear !== "") {
|
|
60740
|
-
normalized.graduationYear = Number(input.graduationYear);
|
|
60741
|
-
}
|
|
60742
|
-
return normalized;
|
|
60743
|
-
}));
|
|
60744
60641
|
var shirtSizePrompt = (participationMode) => {
|
|
60745
60642
|
if (participationMode === "remote")
|
|
60746
60643
|
return exports_Prompt.succeed(undefined);
|
|
@@ -60813,7 +60710,7 @@ var inputOrInteractive = (path4, interactive) => {
|
|
|
60813
60710
|
return cliError("PROMPT_CANCELLED", "Interactive input was cancelled");
|
|
60814
60711
|
}));
|
|
60815
60712
|
};
|
|
60816
|
-
var applicationInput = (path4, publicBaseUrl, defaults2 = {}) => inputOrInteractive(path4,
|
|
60713
|
+
var applicationInput = (path4, publicBaseUrl, defaults2 = {}) => inputOrInteractive(path4, collectApplicationFields(publicBaseUrl, defaults2).pipe(exports_Effect.map((input) => withoutEmptyStrings(input)))).pipe(exports_Effect.flatMap((input) => decode2(ApplicationInput, input, applicationInputFieldNames)), exports_Effect.flatMap((input) => validateSemantics(input, applicationSemanticRequirements(input))));
|
|
60817
60714
|
var applicationDraftInput = (path4) => {
|
|
60818
60715
|
if (!path4) {
|
|
60819
60716
|
return exports_Effect.fail(cliError("INPUT_REQUIRED", "Non-interactive use requires --input <file>, or --input - for stdin"));
|
|
@@ -62549,10 +62446,10 @@ var registerCommand = exports_Command.make("register", { input: inputFlag2, subm
|
|
|
62549
62446
|
return createdText(result3);
|
|
62550
62447
|
return draftSavedText(result3);
|
|
62551
62448
|
});
|
|
62552
|
-
})).pipe(exports_Command.withDescription("Save an application draft
|
|
62449
|
+
})).pipe(exports_Command.withDescription("Save an application draft, then submit it for review"), exports_Command.withExamples([
|
|
62553
62450
|
{
|
|
62554
62451
|
command: "chofex register",
|
|
62555
|
-
description: "Fill or resume application
|
|
62452
|
+
description: "Fill or resume the application interactively"
|
|
62556
62453
|
},
|
|
62557
62454
|
{
|
|
62558
62455
|
command: "chofex --output json register --input application.json",
|
|
@@ -62564,66 +62461,18 @@ var registerCommand = exports_Command.make("register", { input: inputFlag2, subm
|
|
|
62564
62461
|
}
|
|
62565
62462
|
]));
|
|
62566
62463
|
var interactiveRegister = (client, initial) => exports_Effect.gen(function* () {
|
|
62567
|
-
|
|
62568
|
-
|
|
62569
|
-
|
|
62570
|
-
|
|
62571
|
-
|
|
62572
|
-
|
|
62573
|
-
|
|
62574
|
-
|
|
62575
|
-
|
|
62576
|
-
defaults2 = applicationDefaultsFromRegistration(latest.registration);
|
|
62577
|
-
}
|
|
62578
|
-
const choice4 = yield* exports_Prompt.run(exports_Prompt.select({
|
|
62579
|
-
message: "What would you like to do?",
|
|
62580
|
-
choices: [
|
|
62581
|
-
{ title: "Edit identity", value: "identity" },
|
|
62582
|
-
{ title: "Edit experience", value: "experience" },
|
|
62583
|
-
{ title: "Edit team", value: "team" },
|
|
62584
|
-
{
|
|
62585
|
-
title: "Black Box challenge status",
|
|
62586
|
-
value: "challenges"
|
|
62587
|
-
},
|
|
62588
|
-
{ title: "Review agreements", value: "agreements" },
|
|
62589
|
-
{ title: "Submit application", value: "submit" },
|
|
62590
|
-
{ title: "Save and exit", value: "exit" }
|
|
62591
|
-
]
|
|
62592
|
-
})).pipe(exports_Effect.mapError(() => cliError("PROMPT_CANCELLED", "Interactive input was cancelled")));
|
|
62593
|
-
if (choice4 === "exit") {
|
|
62594
|
-
if (!latest) {
|
|
62595
|
-
latest = (yield* saveRegistrationDraft(client, {})).data;
|
|
62596
|
-
}
|
|
62597
|
-
return {
|
|
62598
|
-
version: 1,
|
|
62599
|
-
ok: true,
|
|
62600
|
-
requestId: crypto.randomUUID(),
|
|
62601
|
-
data: latest
|
|
62602
|
-
};
|
|
62603
|
-
}
|
|
62604
|
-
if (choice4 === "submit") {
|
|
62605
|
-
return yield* submitRegistration(client);
|
|
62606
|
-
}
|
|
62607
|
-
if (choice4 === "challenges") {
|
|
62608
|
-
const attempt = yield* getChallengeAttempt(client, "black-box");
|
|
62609
|
-
yield* exports_Console.log(`
|
|
62610
|
-
${challengeShowText(attempt.data)}
|
|
62611
|
-
`);
|
|
62612
|
-
latest = (yield* getRegistration(client)).data;
|
|
62613
|
-
continue;
|
|
62614
|
-
}
|
|
62615
|
-
let partBody = {};
|
|
62616
|
-
if (choice4 === "identity") {
|
|
62617
|
-
partBody = yield* collectIdentityPart(defaults2);
|
|
62618
|
-
} else if (choice4 === "experience") {
|
|
62619
|
-
partBody = yield* collectExperiencePart(defaults2);
|
|
62620
|
-
} else if (choice4 === "team") {
|
|
62621
|
-
partBody = yield* collectTeamPart(defaults2);
|
|
62622
|
-
} else {
|
|
62623
|
-
partBody = yield* collectAgreementsPart(config.publicSiteUrl, defaults2);
|
|
62624
|
-
}
|
|
62625
|
-
latest = (yield* saveRegistrationDraft(client, partBody)).data;
|
|
62464
|
+
const latest = exports_Option.isSome(initial) ? initial.value.data : undefined;
|
|
62465
|
+
if (latest) {
|
|
62466
|
+
yield* exports_Console.log(registrationPartsText(latest));
|
|
62467
|
+
} else {
|
|
62468
|
+
yield* exports_Console.log("No draft yet. Answers are saved on the server after you finish.");
|
|
62469
|
+
}
|
|
62470
|
+
let defaults2 = {};
|
|
62471
|
+
if (latest) {
|
|
62472
|
+
defaults2 = applicationDefaultsFromRegistration(latest.registration);
|
|
62626
62473
|
}
|
|
62474
|
+
const body = yield* collectApplicationFields(config.publicSiteUrl, defaults2);
|
|
62475
|
+
return yield* saveRegistrationDraft(client, body);
|
|
62627
62476
|
});
|
|
62628
62477
|
var statusCommand = exports_Command.make("status", {}, exports_Effect.fn("statusCommand")(function* () {
|
|
62629
62478
|
const options = yield* root;
|
|
@@ -62663,7 +62512,7 @@ var confirmCommand = exports_Command.make("confirm", {
|
|
|
62663
62512
|
const body = yield* acceptedDetailsInput(exports_Option.getOrUndefined(input), current.data.registration.participationMode, {
|
|
62664
62513
|
clerkPictureUrl: currentUser.data.clerkPictureUrl,
|
|
62665
62514
|
githubUrl: current.data.registration.githubUrl,
|
|
62666
|
-
currentFullName:
|
|
62515
|
+
currentFullName: joinFullName(current.data.registration.firstName, current.data.registration.lastName) || current.data.registration.fullName
|
|
62667
62516
|
});
|
|
62668
62517
|
const picturePath = exports_Option.getOrUndefined(picture);
|
|
62669
62518
|
if (body.pictureSource === "upload") {
|
|
@@ -62754,25 +62603,11 @@ var validateCommand = exports_Command.make("validate", { input: inputFlag2, stag
|
|
|
62754
62603
|
}
|
|
62755
62604
|
]));
|
|
62756
62605
|
var applicationTemplate = {
|
|
62757
|
-
|
|
62758
|
-
lastName: "Lovelace",
|
|
62759
|
-
pronouns: "she/her",
|
|
62760
|
-
city: "Lima",
|
|
62761
|
-
organization: "Analytical Engines",
|
|
62606
|
+
fullName: "Ada Lovelace",
|
|
62762
62607
|
role: "Programmer",
|
|
62763
|
-
fieldOfStudy: "Computer Science",
|
|
62764
|
-
graduationYear: 2026,
|
|
62765
|
-
shippedProject: "An open-source tool that helps teams analyze their data.",
|
|
62766
|
-
hackathonProject: "A collaborative AI prototyping workspace.",
|
|
62767
|
-
bio: "What I hope to build and contribute.",
|
|
62768
62608
|
githubUrl: "https://github.com/ada-lovelace",
|
|
62769
62609
|
linkedInUrl: "https://linkedin.com/in/ada-lovelace",
|
|
62770
|
-
|
|
62771
|
-
teamPreference: "have_team",
|
|
62772
|
-
teamName: "Analytical Engines",
|
|
62773
|
-
codeOfConductAccepted: true,
|
|
62774
|
-
privacyPolicyAccepted: true,
|
|
62775
|
-
mediaConsent: false
|
|
62610
|
+
codeOfConductAccepted: true
|
|
62776
62611
|
};
|
|
62777
62612
|
var acceptanceTemplate = {
|
|
62778
62613
|
fullName: "Ada Lovelace",
|