recess-cli 3.47.0 → 3.47.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.js +22 -0
- package/dist/commands/placement.js +8 -0
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -1806,6 +1806,27 @@ async function validateGoalTemplateDocument(api, document, options = {}) {
|
|
|
1806
1806
|
warnings,
|
|
1807
1807
|
};
|
|
1808
1808
|
}
|
|
1809
|
+
const GRADE_RANGE_TAG = /^Grades?\s+(?:K|\d{1,2})(?:\s*[-–]\s*(?:K|\d{1,2}))?$/i;
|
|
1810
|
+
/**
|
|
1811
|
+
* Preview note when a template lacks exactly one grade-range tag. Derived from
|
|
1812
|
+
* the document alone: the approval fingerprint hashes the preview, so this has
|
|
1813
|
+
* to read the same on a confirmed retry, when server warnings are skipped.
|
|
1814
|
+
*/
|
|
1815
|
+
function gradeTagWarning(tags) {
|
|
1816
|
+
const list = Array.isArray(tags)
|
|
1817
|
+
? tags
|
|
1818
|
+
: typeof tags === "string"
|
|
1819
|
+
? tags.split(",")
|
|
1820
|
+
: [];
|
|
1821
|
+
const count = list.filter((tag) => typeof tag === "string" && GRADE_RANGE_TAG.test(tag.trim())).length;
|
|
1822
|
+
if (count === 1)
|
|
1823
|
+
return {};
|
|
1824
|
+
return {
|
|
1825
|
+
gradeTagWarning: count === 0
|
|
1826
|
+
? 'No grade-range tag. Stop and add exactly one (e.g. "Grades 3-6") judged from the content; families see it on the card and recommendations use it.'
|
|
1827
|
+
: `${count} grade-range tags; keep exactly one.`,
|
|
1828
|
+
};
|
|
1829
|
+
}
|
|
1809
1830
|
/**
|
|
1810
1831
|
* Bring a clean, fully pushed checkout up to the remote workspace tip as one
|
|
1811
1832
|
* local commit, then advance its metadata. Capture writes lesson `Item key`
|
|
@@ -4841,6 +4862,7 @@ export async function executeRecessCommand(argv, options = {}) {
|
|
|
4841
4862
|
wizardStepKeys: validation.stepKeys,
|
|
4842
4863
|
specSha256: validation.sha256,
|
|
4843
4864
|
specInventory: validation.totals,
|
|
4865
|
+
...gradeTagWarning(document.tags),
|
|
4844
4866
|
answersTemplate: "answersTemplate" in validation
|
|
4845
4867
|
? validation.answersTemplate
|
|
4846
4868
|
: buildAnswersTemplate(document.setupWorkflowSpec, []).answers,
|
|
@@ -36,6 +36,14 @@ export async function runPlacementCommand({ parsed, api, writeCommand, }) {
|
|
|
36
36
|
const lines = [`${p.subjectLabel}: ${status}`];
|
|
37
37
|
if (p.gaps.length > 0)
|
|
38
38
|
lines.push(` Gaps: ${p.gaps.join(", ")}`);
|
|
39
|
+
for (const stage of p.story?.stages ?? []) {
|
|
40
|
+
const read = !stage.read
|
|
41
|
+
? "not read yet"
|
|
42
|
+
: stage.read.skipped
|
|
43
|
+
? "read aloud skipped"
|
|
44
|
+
: `${stage.read.mistakes} words missed reading aloud, ${stage.read.wordsPerMinute} words a minute`;
|
|
45
|
+
lines.push(` Stage ${stage.stage} ${stage.passed ? "passed" : "not passed"}: ${stage.correct} of ${stage.total} right, ${read}`);
|
|
46
|
+
}
|
|
39
47
|
if (p.results.length > 0) {
|
|
40
48
|
const right = p.results.filter((r) => r.correct).length;
|
|
41
49
|
lines.push(` ${right} of ${p.results.length} right`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recess-cli",
|
|
3
|
-
"version": "3.47.
|
|
3
|
+
"version": "3.47.1",
|
|
4
4
|
"description": "Safe Recess administration and family AI tools from the command line.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"oxlint-tsgolint": "^0.6.0",
|
|
47
47
|
"typescript": "^5.9.2",
|
|
48
48
|
"vitest": "^1.6.0",
|
|
49
|
-
"@tryrecess/
|
|
50
|
-
"@tryrecess/
|
|
49
|
+
"@tryrecess/api-types": "0.0.0",
|
|
50
|
+
"@tryrecess/typescript-config": "0.0.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "node node_modules/@tryrecess/typescript-config/bin/tsc-fast.mjs",
|