chofex-cli 0.1.18 → 0.1.20
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 +10 -4
- package/dist/index.js +32 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,10 +19,16 @@ chofex requirements
|
|
|
19
19
|
|
|
20
20
|
For agent or script input, `chofex schema --stage application` and
|
|
21
21
|
`chofex schema --stage acceptance` print complete templates containing every
|
|
22
|
-
accepted JSON key.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
accepted JSON key. Validate a completed input file locally before submitting it:
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
chofex --output json validate --stage application --input application.json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Validation does not contact the API, and a successful result does not echo input
|
|
29
|
+
values. Local validation errors include `acceptedFields` in JSON mode. The
|
|
30
|
+
`status` response already includes both the registration and its requirements;
|
|
31
|
+
use `requirements` only when requirements-only human output is preferred.
|
|
26
32
|
|
|
27
33
|
Run `chofex login` to authenticate. For automation, provide an OAuth access
|
|
28
34
|
token with `CHOFEX_TOKEN`.
|
package/dist/index.js
CHANGED
|
@@ -30802,11 +30802,6 @@ var RegistrationStatus = exports_Schema.Literals([
|
|
|
30802
30802
|
"withdrawn"
|
|
30803
30803
|
]);
|
|
30804
30804
|
var ParticipationMode = exports_Schema.Literals(["in_person", "remote"]);
|
|
30805
|
-
var ExperienceLevel = exports_Schema.Literals([
|
|
30806
|
-
"beginner",
|
|
30807
|
-
"intermediate",
|
|
30808
|
-
"advanced"
|
|
30809
|
-
]);
|
|
30810
30805
|
var TeamPreference = exports_Schema.Literals([
|
|
30811
30806
|
"have_team",
|
|
30812
30807
|
"looking_for_team",
|
|
@@ -30831,8 +30826,8 @@ var applicationInputFields = {
|
|
|
30831
30826
|
role: optionalText(120),
|
|
30832
30827
|
fieldOfStudy: optionalText(160),
|
|
30833
30828
|
graduationYear: exports_Schema.optional(exports_Schema.Int.pipe(exports_Schema.check(exports_Schema.isBetween({ minimum: 1950, maximum: 2100 })))),
|
|
30834
|
-
|
|
30835
|
-
|
|
30829
|
+
shippedProject: nonBlank(2000),
|
|
30830
|
+
hackathonProject: nonBlank(2000),
|
|
30836
30831
|
bio: nonBlank(2000),
|
|
30837
30832
|
githubUrl: exports_Schema.optional(url),
|
|
30838
30833
|
linkedInUrl: exports_Schema.optional(url),
|
|
@@ -30909,8 +30904,8 @@ var RegistrationViewSchema = exports_Schema.Struct({
|
|
|
30909
30904
|
role: exports_Schema.optional(exports_Schema.String),
|
|
30910
30905
|
fieldOfStudy: exports_Schema.optional(exports_Schema.String),
|
|
30911
30906
|
graduationYear: exports_Schema.optional(exports_Schema.Number),
|
|
30912
|
-
|
|
30913
|
-
|
|
30907
|
+
shippedProject: exports_Schema.optional(exports_Schema.String),
|
|
30908
|
+
hackathonProject: exports_Schema.optional(exports_Schema.String),
|
|
30914
30909
|
bio: exports_Schema.optional(exports_Schema.String),
|
|
30915
30910
|
githubUrl: exports_Schema.optional(exports_Schema.String),
|
|
30916
30911
|
linkedInUrl: exports_Schema.optional(exports_Schema.String),
|
|
@@ -31614,15 +31609,8 @@ var applicationDetailsPrompts = exports_Prompt.all({
|
|
|
31614
31609
|
role: optionalText2("Role (optional)"),
|
|
31615
31610
|
fieldOfStudy: optionalText2("Field of study (optional)"),
|
|
31616
31611
|
graduationYear: optionalText2("Graduation year (optional)"),
|
|
31617
|
-
|
|
31618
|
-
|
|
31619
|
-
choices: [
|
|
31620
|
-
{ title: "Beginner", value: "beginner" },
|
|
31621
|
-
{ title: "Intermediate", value: "intermediate" },
|
|
31622
|
-
{ title: "Advanced", value: "advanced" }
|
|
31623
|
-
]
|
|
31624
|
-
}),
|
|
31625
|
-
skills: exports_Prompt.list({ message: "Skills (comma-separated)", delimiter: "," }),
|
|
31612
|
+
shippedProject: requiredText("What have you shipped?"),
|
|
31613
|
+
hackathonProject: requiredText("What do you want to ship at the hackathon?"),
|
|
31626
31614
|
bio: requiredText("Short bio"),
|
|
31627
31615
|
githubUsername: profileUsernamePrompt("GitHub username (optional)", githubProfilePrefix),
|
|
31628
31616
|
linkedInUsername: profileUsernamePrompt("LinkedIn username (optional)", linkedInProfilePrefix),
|
|
@@ -31820,6 +31808,7 @@ var requirementsOnlyText = (result3) => requirementsText(result3);
|
|
|
31820
31808
|
|
|
31821
31809
|
// src/commands.ts
|
|
31822
31810
|
var inputFlag = exports_Flag.string("input").pipe(exports_Flag.optional, exports_Flag.withDescription("Read JSON from a file, or use - for stdin"));
|
|
31811
|
+
var stageFlag = exports_Flag.choice("stage", ["application", "acceptance"]).pipe(exports_Flag.withDefault("application"));
|
|
31823
31812
|
var root = exports_Command.make("chofex").pipe(exports_Command.withSharedFlags({
|
|
31824
31813
|
apiUrl: exports_Flag.string("api-url").pipe(exports_Flag.withDefault(config.apiUrl), exports_Flag.withDescription("Registration API base URL")),
|
|
31825
31814
|
output: exports_Flag.choice("output", ["human", "json"]).pipe(exports_Flag.withDefault("human"), exports_Flag.withDescription("Output format")),
|
|
@@ -31943,6 +31932,27 @@ var whoamiCommand = exports_Command.make("whoami", {}, exports_Effect.fn("whoami
|
|
|
31943
31932
|
const operation = getCurrentUser({ apiUrl: options.apiUrl, token });
|
|
31944
31933
|
yield* execute(options.output, operation, (result3) => `Authenticated as ${result3.email} (${result3.userId}, ${result3.tokenType}).`);
|
|
31945
31934
|
})).pipe(exports_Command.withDescription("Verify the current Clerk authentication"));
|
|
31935
|
+
var inputValidation = (stage, path4) => {
|
|
31936
|
+
if (stage === "application") {
|
|
31937
|
+
return applicationInput(path4, config.publicSiteUrl).pipe(exports_Effect.asVoid);
|
|
31938
|
+
}
|
|
31939
|
+
return acceptedDetailsInput(path4, "in_person").pipe(exports_Effect.asVoid);
|
|
31940
|
+
};
|
|
31941
|
+
var validateCommand = exports_Command.make("validate", { input: inputFlag, stage: stageFlag }, exports_Effect.fn("validateCommand")(function* ({ input, stage }) {
|
|
31942
|
+
const options = yield* root;
|
|
31943
|
+
const operation = inputValidation(stage, exports_Option.getOrUndefined(input)).pipe(exports_Effect.map(() => ({
|
|
31944
|
+
version: 1,
|
|
31945
|
+
ok: true,
|
|
31946
|
+
requestId: crypto.randomUUID(),
|
|
31947
|
+
data: { valid: true, stage }
|
|
31948
|
+
})));
|
|
31949
|
+
yield* execute(options.output, operation, (result3) => `${result3.stage} input is valid.`);
|
|
31950
|
+
})).pipe(exports_Command.withDescription("Validate input without submitting it"), exports_Command.withExamples([
|
|
31951
|
+
{
|
|
31952
|
+
command: "chofex --output json validate --stage application --input application.json",
|
|
31953
|
+
description: "Validate an application file locally"
|
|
31954
|
+
}
|
|
31955
|
+
]));
|
|
31946
31956
|
var applicationTemplate = {
|
|
31947
31957
|
firstName: "Ada",
|
|
31948
31958
|
lastName: "Lovelace",
|
|
@@ -31952,8 +31962,8 @@ var applicationTemplate = {
|
|
|
31952
31962
|
role: "Programmer",
|
|
31953
31963
|
fieldOfStudy: "Computer Science",
|
|
31954
31964
|
graduationYear: 2026,
|
|
31955
|
-
|
|
31956
|
-
|
|
31965
|
+
shippedProject: "An open-source tool that helps teams analyze their data.",
|
|
31966
|
+
hackathonProject: "A collaborative AI prototyping workspace.",
|
|
31957
31967
|
bio: "What I hope to build and contribute.",
|
|
31958
31968
|
githubUrl: "https://github.com/ada-lovelace",
|
|
31959
31969
|
linkedInUrl: "https://linkedin.com/in/ada-lovelace",
|
|
@@ -31980,9 +31990,7 @@ var templateFor = (stage) => {
|
|
|
31980
31990
|
return applicationTemplate;
|
|
31981
31991
|
return acceptanceTemplate;
|
|
31982
31992
|
};
|
|
31983
|
-
var schemaCommand = exports_Command.make("schema", {
|
|
31984
|
-
stage: exports_Flag.choice("stage", ["application", "acceptance"]).pipe(exports_Flag.withDefault("application"))
|
|
31985
|
-
}, exports_Effect.fn("schemaCommand")(function* ({ stage }) {
|
|
31993
|
+
var schemaCommand = exports_Command.make("schema", { stage: stageFlag }, exports_Effect.fn("schemaCommand")(function* ({ stage }) {
|
|
31986
31994
|
yield* printJson(templateFor(stage));
|
|
31987
31995
|
})).pipe(exports_Command.withDescription("Print a complete machine-readable input template"), exports_Command.withExamples([
|
|
31988
31996
|
{
|
|
@@ -31994,6 +32002,7 @@ var command = root.pipe(exports_Command.withSubcommands([
|
|
|
31994
32002
|
loginCommand,
|
|
31995
32003
|
logoutCommand,
|
|
31996
32004
|
whoamiCommand,
|
|
32005
|
+
validateCommand,
|
|
31997
32006
|
registerCommand,
|
|
31998
32007
|
statusCommand,
|
|
31999
32008
|
requirementsCommand,
|