@tostudy-ai/cli 0.17.1 → 0.17.2
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 +24 -12
- package/dist/cli.js.map +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1668,7 +1668,7 @@ function formatLesson(data) {
|
|
|
1668
1668
|
if (lesson.exerciseContent) {
|
|
1669
1669
|
lines.push("", "\u2500\u2500\u2500 Exerc\xEDcio \u2500\u2500\u2500", lesson.exerciseContent);
|
|
1670
1670
|
}
|
|
1671
|
-
if (/^checkpoint/i.test(lesson.title.trim())) {
|
|
1671
|
+
if (lesson.type === "checkpoint" || /^checkpoint/i.test(lesson.title.trim())) {
|
|
1672
1672
|
lines.push(
|
|
1673
1673
|
"",
|
|
1674
1674
|
"\u{1F4A1} Escreva suas respostas num arquivo (ex: checkpoint.md) e valide:",
|
|
@@ -1758,11 +1758,20 @@ function formatModuleStart(data) {
|
|
|
1758
1758
|
if (firstLesson.acceptanceCriteria) {
|
|
1759
1759
|
lines.push("", "Crit\xE9rios de aceita\xE7\xE3o:", firstLesson.acceptanceCriteria);
|
|
1760
1760
|
}
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1761
|
+
if (firstLesson.type === "checkpoint" || /^checkpoint/i.test(firstLesson.title.trim())) {
|
|
1762
|
+
lines.push(
|
|
1763
|
+
"",
|
|
1764
|
+
"\u{1F4A1} Escreva suas respostas num arquivo (ex: checkpoint.md) e valide:",
|
|
1765
|
+
" tostudy validate checkpoint.md",
|
|
1766
|
+
"\u2192 tostudy hint para obter uma dica"
|
|
1767
|
+
);
|
|
1768
|
+
} else {
|
|
1769
|
+
lines.push(
|
|
1770
|
+
"",
|
|
1771
|
+
"\u2192 tostudy validate <resposta> para validar sua solu\xE7\xE3o",
|
|
1772
|
+
"\u2192 tostudy hint para obter uma dica"
|
|
1773
|
+
);
|
|
1774
|
+
}
|
|
1766
1775
|
return lines.join("\n");
|
|
1767
1776
|
}
|
|
1768
1777
|
function formatMoreTheory(data) {
|
|
@@ -3522,7 +3531,7 @@ var CLI_VERSION;
|
|
|
3522
3531
|
var init_version = __esm({
|
|
3523
3532
|
"src/version.ts"() {
|
|
3524
3533
|
"use strict";
|
|
3525
|
-
CLI_VERSION = true ? "0.17.
|
|
3534
|
+
CLI_VERSION = true ? "0.17.2" : "0.7.1";
|
|
3526
3535
|
}
|
|
3527
3536
|
});
|
|
3528
3537
|
|
|
@@ -4922,12 +4931,15 @@ function adjustTimeEstimate(type, baseMinutes) {
|
|
|
4922
4931
|
if (type === "exercise") return Math.max(baseMinutes, 30);
|
|
4923
4932
|
return baseMinutes;
|
|
4924
4933
|
}
|
|
4925
|
-
function isCheckpoint(title) {
|
|
4926
|
-
return /^checkpoint/i.test(title.trim());
|
|
4934
|
+
function isCheckpoint(type, title) {
|
|
4935
|
+
return type === "checkpoint" || /^checkpoint/i.test(title.trim());
|
|
4936
|
+
}
|
|
4937
|
+
function isPracticalType(type) {
|
|
4938
|
+
return type === "exercise" || type === "checkpoint" || type === "realworld" || type === "project";
|
|
4927
4939
|
}
|
|
4928
4940
|
function formatLessonContent(data, workspacePath, courseTitle) {
|
|
4929
4941
|
const time3 = adjustTimeEstimate(data.type, data.estimatedTimeMinutes);
|
|
4930
|
-
const isPractical = data.type
|
|
4942
|
+
const isPractical = isPracticalType(data.type) || isCheckpoint(data.type, data.title);
|
|
4931
4943
|
const lines = [`\u2501\u2501\u2501 Li\xE7\xE3o: ${data.title} \u2501\u2501\u2501`];
|
|
4932
4944
|
if (isPractical && workspacePath) {
|
|
4933
4945
|
const base = path13.basename(workspacePath) === ".tostudy" ? path13.dirname(workspacePath) : workspacePath;
|
|
@@ -4948,7 +4960,7 @@ function formatLessonContent(data, workspacePath, courseTitle) {
|
|
|
4948
4960
|
if (data.hints && data.hints.length > 0) {
|
|
4949
4961
|
lines.push("", `Dicas dispon\xEDveis: ${data.hints.length}`);
|
|
4950
4962
|
}
|
|
4951
|
-
if (isCheckpoint(data.title)) {
|
|
4963
|
+
if (isCheckpoint(data.type, data.title)) {
|
|
4952
4964
|
lines.push(
|
|
4953
4965
|
"",
|
|
4954
4966
|
"\u{1F4A1} Escreva suas respostas num arquivo (ex: checkpoint.md) e valide:",
|
|
@@ -5024,7 +5036,7 @@ var init_lesson = __esm({
|
|
|
5024
5036
|
{ json: false }
|
|
5025
5037
|
);
|
|
5026
5038
|
}
|
|
5027
|
-
if (content.type
|
|
5039
|
+
if (isPracticalType(content.type) && !ws.found) {
|
|
5028
5040
|
process.stderr.write(
|
|
5029
5041
|
"\n\u{1F4A1} Dica: rode `tostudy select` desta pasta para us\xE1-la como workspace, ou `tostudy workspace setup` para criar em ~/study/.\n"
|
|
5030
5042
|
);
|