@trainheroic-unofficial/cli 3.3.0 → 3.3.1
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/dist/cli.mjs +9 -3
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -3939,6 +3939,10 @@ var JsonFileLibraryCache = class {
|
|
|
3939
3939
|
function looksLikeJson(s) {
|
|
3940
3940
|
return /^\s*[[{]/u.test(s);
|
|
3941
3941
|
}
|
|
3942
|
+
/** Fail closed before changing the live calendar assigned to a team. */
|
|
3943
|
+
function requireTeamCalendarReassignmentConfirmation(teamId, groupProgram, confirmed) {
|
|
3944
|
+
if (groupProgram !== void 0 && !confirmed) throw new Error(`reassigning team ${teamId}'s calendar changes live athlete programming; add --yes.`);
|
|
3945
|
+
}
|
|
3942
3946
|
//#endregion
|
|
3943
3947
|
//#region src/session-cache.ts
|
|
3944
3948
|
const TTL_MS = 216e5;
|
|
@@ -4026,7 +4030,7 @@ Coach — manage a roster (needs a coach account):
|
|
|
4026
4030
|
coach program-create --kind calendar|fixed --name "..."
|
|
4027
4031
|
coach program-delete --program <id> --yes
|
|
4028
4032
|
coach team-create --title "..."
|
|
4029
|
-
coach team-update --team <id> [--title "..."] [--group-program <id>]
|
|
4033
|
+
coach team-update --team <id> [--title "..."] [--group-program <id> --yes]
|
|
4030
4034
|
coach team-publish-settings (--team <id> | --program <id>) [--pub-enabled 0|1] --yes
|
|
4031
4035
|
coach team-delete --team <id> --yes
|
|
4032
4036
|
coach team-code-create --team <id> [--type N]
|
|
@@ -4922,16 +4926,18 @@ async function cmdCoachProgramDelete(client, a) {
|
|
|
4922
4926
|
return out(await deleteProgram(client, programId));
|
|
4923
4927
|
}
|
|
4924
4928
|
async function cmdCoachTeamUpdate(client, a) {
|
|
4925
|
-
const usage = "coach team-update --team <id> [--title \"...\"] [--group-program <id>] (at least one of --title / --group-program)";
|
|
4929
|
+
const usage = "coach team-update --team <id> [--title \"...\"] [--group-program <id> --yes] (at least one of --title / --group-program)";
|
|
4926
4930
|
const { values } = parse(a, {
|
|
4927
4931
|
team: { type: "string" },
|
|
4928
4932
|
title: { type: "string" },
|
|
4929
|
-
"group-program": { type: "string" }
|
|
4933
|
+
"group-program": { type: "string" },
|
|
4934
|
+
yes: { type: "boolean" }
|
|
4930
4935
|
});
|
|
4931
4936
|
const teamId = toInt(need(values.team, usage), "--team");
|
|
4932
4937
|
const title = values.title;
|
|
4933
4938
|
const groupProgramRaw = values["group-program"];
|
|
4934
4939
|
if (title === void 0 && groupProgramRaw === void 0) fail(usage);
|
|
4940
|
+
requireTeamCalendarReassignmentConfirmation(teamId, groupProgramRaw, values.yes === true);
|
|
4935
4941
|
const args = { teamId };
|
|
4936
4942
|
if (title !== void 0) args.title = title;
|
|
4937
4943
|
if (groupProgramRaw !== void 0) args.groupProgram = toInt(groupProgramRaw, "--group-program");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/cli",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"zod": "^4.4.3",
|
|
24
|
-
"@trainheroic-unofficial/dto": "3.3.
|
|
25
|
-
"@trainheroic-unofficial/js": "3.3.
|
|
24
|
+
"@trainheroic-unofficial/dto": "3.3.1",
|
|
25
|
+
"@trainheroic-unofficial/js": "3.3.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^26.2.0",
|